-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi :)
You may check the issue even with the default simple application created
by web admin. Simply add this to the default controller:
class Blah():
def __init__(self):
pass
def blahstuff():
p = cache.ram('blahblah',Blah,time_expire=30)
return dict(p=BEAUTIFY(p))
def guppy():
from guppy import hpy
h = hpy()
label='h.heap()'
form = FORM(LABEL("Guppy code: "),INPUT(_name="code", _size='35',
_value=label),INPUT(_type="submit", _value="Execute.."))
if form.accepts(request.vars, session):
heap = eval(request.vars.code)
label = request.vars.code
else:
heap = h.heap()
fullstack = h.heap().parts
return dict(heap=PRE(heap), fullstack=PRE(BEAUTIFY(fullstack)),
label=label, form=form)
If you visit heapy() first time, the results contains:
Partition of a set of 24 objects. Total size = 80448 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 24 100 80448 100 80448 100 dict of gluon.dal.Field
Once you run blahstuff(), heapy() reports:
Partition of a set of 48 objects. Total size = 160896 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 48 100 160896 100 160896 100 dict of gluon.dal.Field
David
mdipierro wrote:
> can you show us the guppy stats before and after caching? without
> caching any db object?
> can you also email me the entire app code?
>
> On Jan 4, 9:15 am, David Zejda <[email protected]> wrote:
> Whenever in controller/model is the class declared, the same result.
>
> Michele Comitini wrote:
>>>> Try to put the Blah class in the global scope of the controller. Do
>>>> you get same result?
- --
David Zejda, Open-IT cz
web development & services
http://www.o-it.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAk0jYp0ACgkQ3oCkkciamVEyngCfeFLsLcFyo3+97O0wc0w/cbPM
oI8AoLY5t0URVVk2+ehOFomsMAjZzlyv
=0hmM
-----END PGP SIGNATURE-----