Would still help to see your specific model code. Is the field in question a reference field with a "represent" attribute? If so, you'll get separate queries for each item in order to lookup the represent value. How many records in the table? Do you have an index on the field being searched? If you execute the same query in a separate DB client, how long does it take?
Anthony On Thursday, May 22, 2014 8:37:55 AM UTC-4, Sarbjit wrote: > > Hi Anthony, > > Code is almost identical to the code posted in slice with change in field > names and number of records. Only additonal difference is that I am using > "orderby" in the query before returing the results. > > Surprisingly, sometime the result appears fast (within 2-3 seconds) but > some time it takes long time to populate it. > > -Sarbjit > > On Thursday, May 22, 2014 4:46:55 PM UTC+5:30, Anthony wrote: >> >> Would help to see some code. 4-5 seconds sounds much too long. >> >> You might also look into >> http://dev.s-cubism.com/plugin_lazy_options_widget. >> >> Anthony >> >> On Thursday, May 22, 2014 12:17:42 AM UTC-4, Sarbjit wrote: >>> >>> Hi, >>> >>> I am using cascading drop-down based on the slice posted on " >>> http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2". >>> >>> In my application, the number of sub-records for drop-down are typically in >>> range of 50-60, so every-time I change the first option in drop down, it >>> takes significant time (around 4-5 seconds) to populate my second drop down. >>> >>> I was wondering if there is a way to make this fast by means of caching >>> or by storing the data for all the records the first time when user logs >>> into the system and then using that data. Can some one please comment on >>> how to address this problem and if possible, an example would be helpful. >>> >>> -Sarbjit >>> >> -- 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.