If you have requires=IS_IN_DB(...), you will get a default select widget with all the options listed. If there are a large number of options, this could slow things down (not to mention creating a bad user experience, forcing the user to scroll through thousands of options). In that case, you should consider an alternative widget, such as an auto-complete. In any case, you can disable the default widget by simply putting the validator into a list (i.e., [IS_IN_DB(...)]) or by specifying a custom widget.
Hard to say if this is the real problem, though, without seeing some code. Anthony On Wednesday, November 25, 2015 at 11:59:45 AM UTC-5, Karl Florian wrote: > > Hi, > > 5 fields with requires IS_IN_DB in one of my database tables makes loading > of my SQLFORM.grid and SQLFORM very slow. > It takes about 20 seconds to open up the SQLFORM.grid view. > The users need to pick values out of these 5 masterdata tables. > > My Impression is that alle of these table are completely loaded into > Memory every time the SQLFORM.grid or SQLFORM gets activated. > My Airport table contains 3500 records. If i use a smaler table with let > say 500 records it seems to work a lot faster. > > Is there a way to include simple picklists that are only activated wenn > user opens clicks on the field, like you would do in a Windows application? > How can i optimise this? > > Thanks in advance > > Karl > -- 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) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.