On Wednesday, November 20, 2013 12:27:23 AM UTC+2, Michele Comitini wrote:
>
> Use the profiler to make your tests even more effective
>

>
Well, I AM using cProfiler that comes with python...
Not sure this comment was directed to me, or Niphlod...

I wasn't using 'timeit', though, so that might have something to do with 
the discrepancy...

Generally, there is no perfect-profiler... They all 'lie' differently, and 
to different degrees... It's all 'Heisenberg' stuff to some degree or 
another, as any timing code is a change to the execution-logic...

cProfiler is a c-compiled-level instrumentation of the actual c-python 
interpreter - as far as I understand...

'timeit' is just a python-module in the STL...
You have to code the setup/execution/tear-down structure yourself, as 
Niphlod did - cProfiler just lets you run your code unchanged..

There are overheads to each, and they might be different, so that may help 
explain the different results we are getting, but I'm still not convinced 
that this is the largest influence on the discrepancy. I think it has more 
to do with the actual structure of the use-case.

If you have a simple app with either a simple schema/query-patterns, 
small-payload queries, or both, than yeah, the parsing overhead would 
probably seem negligible - but once you get past that, hand you 
data-structure, schema,  query-patterns and payloads start inflating, that 
these issues start to emerge.

If I am misinterpreting the test-results, misunderstanding the 
implications, or in some way not reading correctly what's going on, I'd 
love to be corrected - but this is how it appears to me now.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to