Yes, same machine, same installation. All I did was move the module from my 
test directory to web2py's site-packages folder. Then I copied the main 
program into my default application controller. *The same code is executing*
.

Just to be sure I'm not going out of mind, I printed out the elapsed time 
for each iteration in the main program (for both the command line execution 
and the web2py app execution). Lo and behold, the elapsed time for each 
iteration is much longer under web2py.

Note that pyShipping is a pure Python implementation. The Python supporting 
libraries **should** be the same in both instances.

I do note, however, that when I tried to incorporate the code into web2py, 
I found a namespace clash (class Package appears elsewhere in the web2py 
installation). I resolved this by renaming the module file. Otherwise, 
there should be no difference between command line execution and web2py 
execution.

Thanks.


On Thursday, 13 March 2014 15:54:37 UTC-4, Jonathan Lundell wrote:
>
> On 13 Mar 2014, at 12:48 PM, horridohobbyist 
> <horrido...@gmail.com<javascript:>> 
> wrote:
>
> I have a rather peculiar Python performance issue with web2py. I'm using 
> pyShipping 1.8a (from http://pydoc.net/Python/pyShipping/1.8a/). The 
> standalone program from the command line works quickly. However, after I've 
> incorporated the code into my web2py application, the same pyShipping code 
> takes orders of magnitude longer to execute!!! How can this be?!
>
> I presume in both instances that "pre-compiled" code is being run.
>
>
>
> Same machine, same Python installation? If not, maybe C vs Python 
> supporting libraries?
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to