I reduced the code in controller to:

def autoadjust():
    lista = list()
    last_row = None
    next_page_number = 0
    for row in db.executesql( "select * from file_properties where id > 0" 
):
        pass
    lista = TABLE( *lista )
    return dict( lista = lista )


And I still have memleak :(

I start web2py:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
10080    17340  4.6  0.3 156896 15372 pts/9    Sl+  16:19   0:00 python ./
web2py.py

After first run:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
10080    17340  0.7  2.1 237932 87304 pts/9    Sl+  16:19   0:00 python ./
web2py.py

2th run:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
10080    17340  0.8  3.7 302328 151600 pts/9   Sl+  16:19   0:01 python ./
web2py.py

and so on... I'm a bit puzzled. I'm not an expert regarding python mem 
problems :( So please be patient with me.


2012. május 10., csütörtök 15:40:36 UTC+2 időpontban rochacbruno a 
következőt írta:
>
> Just for curiosity, what happens if you do it in pure sql?
>
> for row in db.executesql("select * from file_properties where id > 0"):
>
>     # do something
>
>
> Does it have a lower memory usage?
>
>
> On Thu, May 10, 2012 at 4:14 AM, Bruce Wade <> wrote:
>
>> for row in db( db.file_properties.id > 0 ).select(
>
>
>
>
> -- 
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>

Reply via email to