On Jun7, 3:13pm, Alexey Nezhdanov <snak...@gmail.com> wrote: > On Sunday 07 June 2009 06:51:42 mdipierro wrote:> Turns out the current DAL > spends lots of time in building the SQL > > representation of a table (CREATE TABLE) even if the table does not > > need to be created. I will fix this and it will speed it up a lot > > without need for lazy evaluations. > > Hmm. Tried this: > if args['migrate']: > sql_locker.acquire() > try: > query = t._create(migrate=args['migrate']) > except BaseException, e: > sql_locker.release() > raise e > sql_locker.release()
Just a remind. The try...except clause above should better change into this one. try: query=t._create(...) finally: sql_locker.release() Only in this way, any exception (if any) inside t._create(...) can show its correct break point, rather than the line "raise e". > BTW - your reminder on '-F' flag moved me into running some profiling. > I use my own stats analyzer wich produces gprof2-like output. > ... > A short explanation for the people who didn't use gprof2 yet. > ... > Each line has the following format: > (1) [index] - only the function in question has it BTW, how to get a gprof2 output when profiling a python script and/or a web2py instance? Google "gprof2 python" did not give much help, I must be blind. :-/ I really like the "[index] - only the function in question has it", which seems lack in the default standard python profiling module. Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---