Re: [web2py] Re: Form submit takes too long

2018-09-18 Thread Maurice Waka
Noted. I removed some while loops with tremendous results. It now works well. Regards. On Sep 18, 2018 7:02 AM, "Massimo Di Pierro" wrote: > I understand the confusion. In SQLAlchemy for example people use .first() > for fetch one record. In web2py the feching is by the select. .first() just >

[web2py] Re: Form submit takes too long

2018-09-17 Thread Massimo Di Pierro
I understand the confusion. In SQLAlchemy for example people use .first() for fetch one record. In web2py the feching is by the select. .first() just gives you the fist of the records that were retrieved. On Sunday, 2 September 2018 18:52:35 UTC-7, Anthony wrote: > > - my first attempt will be

[web2py] Re: Form submit takes too long

2018-09-02 Thread Anthony
> > - my first attempt will be to try to add indexes in the post and answers > Table on the field author. > - secondly i will try to change this row > >> row = db(db.post.author== auth.user.id).select(db.post.id, db.post. >> message, orderby=~db.post.id, limitby=(0,1)).first() > > to this >> >>

Re: [web2py] Re: Form submit takes too long

2018-09-02 Thread Maurice Waka
Hey @Lovdie. Can we have a look at this later? On Sun, 2 Sep 2018, 21:13 Lovedie JC wrote: > Am using sqlite.storage > > On Sun, 2 Sep 2018, 21:03 justice Nanhou wrote: > >> Hallo Maurice, >> >> it is know issue for all application and all framworks. >> which database are you using ? >> - my

Re: [web2py] Re: Form submit takes too long

2018-09-02 Thread Lovedie JC
Am using sqlite.storage On Sun, 2 Sep 2018, 21:03 justice Nanhou wrote: > Hallo Maurice, > > it is know issue for all application and all framworks. > which database are you using ? > - my first attempt will be to try to add indexes in the post and answers > Table on the field author. > -

Re: [web2py] Re: Form submit takes too long

2018-09-02 Thread Lovedie JC
Yes. Been away. But I am looking into this. I'll let you know the results. Regards On Sun, 2 Sep 2018, 21:03 justice Nanhou wrote: > Hallo Maurice, > > it is know issue for all application and all framworks. > which database are you using ? > - my first attempt will be to try to add indexes in

[web2py] Re: Form submit takes too long

2018-09-02 Thread justice Nanhou
Hallo Maurice, it is know issue for all application and all framworks. which database are you using ? - my first attempt will be to try to add indexes in the post and answers Table on the field author. - secondly i will try to change this row > row = db(db.post.author==

[web2py] Re: Form submit takes too long

2018-08-30 Thread Leonel Câmara
Apart from the obvious problem Anthony pointed. Are you using sqlite in a highly concurrent environment? -- 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)

Re: [web2py] Re: Form submit takes too long

2018-08-29 Thread Maurice Waka
Answers is a small table, can have up to 100 rows. I'll introduce the limitby(). There are several functions that an item loops through, almost 100, but with a filter to limit the number of functions, with the final result returned by report() On Wed, 29 Aug 2018, 18:30 Anthony wrote: >

[web2py] Re: Form submit takes too long

2018-08-29 Thread Anthony
> > db.answers.insert(quest=names, message=report()) > What does report() do? Is that an expensive function? > replies = db(db.answers.author == auth.user.id).select(db.answers.ALL > )[-10:-1] > Above you are selecting every record in the db.answers table and converting them to