On Sunday 07 June 2009 18:41:30 mdipierro wrote:
> I implemented a backward compatible speedup of the default validators.
> I also realized that those many calls to is_integer could be avoided.
> I think I fixed it.
0.0429/0.0844
Somehow consistency is not kept across reboots :(
... about a hour later: and actually now I get about 10% noise so it become 
very hard to make any good measurements. I'll try tomorrow on better 
hardware. In the meanwhile, I'll try to profile it once again.
...
ok, there are still two perfomance hogs left: SQLTable.__init__ (about 11%) 
and SQLField.__init__ (about 6,5%). These percentages are 'self' times - i.e. 
it was spent directly in lines 1099-1149, 1693-1752.
Python profiling doesn't allow to attribute CPU consumption to individual 
lines so for now I don't have any more precise pointers. But that could be 
split into functional blocks and narrowed further down.

In any case - we collected almost all low-hanging fruits. Any further 
optimisation will give gains of range 2-5%, not times anymore.

Except lazy tables which still may give tens of percents. BTW - Massimo, you 
said something about SQLLazyTable class. You should implement SQLLazyField 
too then. Or may be just wait a day or two until I do deeper profiling.

> Please check out the latest trunk.
>
> Massimo
>

P.S. Here is small fix to is_integer. We forgot about negative numbers:
Also this version is tiny bit faster
is_integer=re.compile('-?[\d]+).match

-- 
Sincerely yours
Alexey Nezhdanov

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to