There is a problem, GAE does not allow setting os environ variables
(they are read only for security).

os.environ['WEB2PY_RUNTIME'] = "GOOGLE"  # will not have any effect.

Instead of os.environ, how about a web2py.environ global dict which
serves the same purpose and works on GAE?

Also the logstats decorator in gaehandler.py can be used to measure
speedup, but there is a typo in the code:

<<<<<<
(ti, c1) = timer(time)
=======
(t1, c1) = timer(time)
>>>>>>


Robin

On Apr 12, 11:26 am, mdipierro <[email protected]> wrote:
> I did what you suggest. Please give it a try. If the imp.get_magic
> works on gae then web2py may have been slower on GAE that it is
> supposed to be. This should fix it.
>
> Massimo
>
> On Apr 11, 7:59 pm, Robin B <[email protected]> wrote:
>
> > I am not sure if that is true or not.
>
> > To test for GAE, I would set 'is_gae' to True in gaehandler.py to
> > achieve fool-proof detection.
>
> > To detect production/debug on GAE, I use this in 0.py:
>
> > response.debug = os.environ.get('SERVER_SOFTWARE','').startswith
> > ('Devel')
>
> > Robin
>
> > On Apr 11, 2:59 pm, mdipierro <[email protected]> wrote:
>
> > > Is this still true on GAE?
>
> > > try:
> > >     magic = imp.get_magic()
> > > except:
> > >     is_gae = True
> > > else:
> > >     is_gae = False
>
> > > If not. How can we fix it? If this not true any more it may be causing
> > > a major slow down on GAE.
>
> > > Massimo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to