Is web2py bytecode compiled?
.pyo or .pyc appears in gluon folder?
Maybe in tour production server there is some permission/date issue and
.pyc files cannot be saved, so they are compiled on each run (that takes
time).

Just and idea

Best regards,



Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com


On Fri, Mar 14, 2014 at 11:33 PM, horridohobbyist <horrido.hobb...@gmail.com
> wrote:

> Astonishingly, I've discovered something else...
>
> When I ran the test in my newly-created VM, I only ran it once. Later, I
> noticed I wasn't getting the 30x ratio anymore; I was only getting 2x, like
> Niphlod did.
>
> Luckily, I had taken a snapshot of the VM before running the test, so I
> reverted back to it. This time, I ran the test repeatedly. Here are the
> results:
>
> elapsed time: 0.0515658855438
> elapsed time: 0.00306177139282
> elapsed time: 0.00300478935242
> elapsed time: 0.00301694869995
> elapsed time: 0.00319504737854
>
> Note that it is only *the first run* that shows the 30x ratio.
> Thereafter, I'm only getting the 2x ratio. *This pattern is repeatable*.
>
> I wish I could get 2x ratio on my production server; I could live with
> that. However, I'm still getting 30x. For some reason, it's not settling
> down to 2x like in my VM. Go figure.
>
>
> On Friday, 14 March 2014 15:21:12 UTC-4, horridohobbyist wrote:
>>
>> Okay, I have some excellent news to report. Well, excellent for me, not
>> so much for you guys...
>>
>> I can reproduce the problem on another system. Here's what I did:
>>
>> My Mac has Parallels installed. I created a new VM, downloaded Ubuntu
>> Server 12.04, and installed it. Then I updated it with the latest patches.
>>
>> Then, following the recipe from the Book for "One step production
>> deployment", I installed web2py 2.9.4.
>>
>> I then ran the same Welcome vs command line test. The result?
>>
>> Welcome:
>> elapsed time: 0.0491468906403
>>
>> command line:
>> elapsed time: 0.00160121917725
>>
>> Again, the command line is 30.6 times faster!!!
>>
>> What more evidence do you need? Sorry to say, but there is something
>> wrong with web2py.
>>
>>
>> On Friday, 14 March 2014 14:44:58 UTC-4, Jonathan Lundell wrote:
>>>
>>> On 14 Mar 2014, at 11:28 AM, horridohobbyist <horrido...@gmail.com>
>>> wrote:
>>>
>>> First, I don't know how to use the profiler.
>>>
>>> Second, for something as trivially simple as the Welcome app with the
>>> calculation loop, what is the profiler going to tell us? That simple
>>> multiplication and division are too slow? That the for loop is somehow
>>> broken?
>>>
>>> Should I try to profile the entirety of the web2py framework?
>>>
>>>
>>> I doubt that the profile would tell you much about the loop itself, but
>>> it might show work going on elsewhere, which might be instructive.
>>>
>>>
>>> Clearly, the Welcome app is pointing to a fundamental issue with my
>>> Ubuntu/Apache2/Python/web2py installation (assuming no one else can
>>> replicate the problem). As the Linux server is a production system, I am
>>> limited to how much tinkering I can actually do on it.
>>>
>>> BTW, how does one actually shutdown web2py once it's installed and
>>> running via Apache?
>>>
>>>
>>> It's running as a wsgi process under Apache, so you really need to shut
>>> down Apache, or at least reconfigure it to not run web2py and then do a
>>> graceful restart.
>>>
>>> For this kind of testing (not production), it might be easier to run
>>> web2py directly and use Rocket.
>>>
>>  --
> 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.
>

-- 
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