in compileapp there is some weird logic:
if not os.path.split(model)[0] in paths and c!='appadmin':
continue
elif compiled:
code = read_pyc(model)
elif is_gae:
code = getcfs(model, model,
lambda: compile2(read_file(model), model))
else:
code = getcfs(model, model, None)
It was designed to cache compiled models. It was tested long ago when
GAE was behaving differently. Could this be the problem? What if you
remove the elif is_gae clause?
On Feb 19, 5:20 pm, howesc <[email protected]> wrote:
> i've learned that i don't know how to figure this out. i tried using the
> sys.getsizeof() on globals in various locations in the code and that always
> remained constant even while the memory size of the instance changed.
>
> i did notice that by adding the toolbar to the response on
> welcome/default/index that it adds .5-1MB to the instance memory usage per
> page refresh. is there some way that views or view environments can be
> polluting the global namespace?
>
> i also noticed a call in gluon/main.py to gc.collect() every 100
> requests.....so is there something we know we are leaving around? i tried
> playing with calling it more than once every 100 but got unpredictable
> results.
>
> any ideas on how i can better track this? i don't know much about figuring
> out python memory usage in general, let alone in the GAE environment - so
> i'm happy to try any tools/tests anyone can recommend.
>
> thanks!
>
> christian