ajax update slow with large data

mirceat

Member
Hello,

I have 3 dbjoins rendered as dropdown in my form: county, city and street name. City and street name are populated based on previous selection. Works fine for city but the ajax upload is very slow for street names, for example if the dbjoin should display over 4000 street names it takes over 15 seconds.

I know that Ii can't use the autocomplete function with ajax update (would be very helpful in this situation for me) but there is any other way to speed up the loading?

The Where clause for "street" dbjoin element is set to filter based county and city have values. There is a "please select" option enabled and default value is set to 0. Value is set to id, Label to street name.

{thistable}.county_id = '{contracts_tool_servicii_830_repeat___county_raw}' and {thistable}.city_id = '{contracts_tool_servicii_830_repeat___city_raw}'

Thank you
 
Are your dbjoins using the primary key (usually id[Recommended] as value?

Make sure to have a MySQL index on each column used as value.
You'll may have to add them manually with e.g. phpMyAdmin.
 
Yep, county_id and city_id are indexed (joined key I think is the name? there is a single key for both columns); running the query directy in mysql database take 0.015 seconds, county_id key is applied and rows are 100% filtered.

Can you confirm that there is no problem with loading large set of data in a dbjoin element (over 4000 rows) having Ajax update enabled? I know that it works fine to search for companies names in a dbjoin element rendered as autocomplete without any "Where" clause, but having placeholders and Ajax update enabled seems to be a problem for me..

I was thinking to add a new selection: "street type" before this element but I don't know yet from where i can get this information to filter the street names..
 
Last edited:
Can you confirm that there is no problem with loading large set of data in a dbjoin element (over 4000 rows) having Ajax update enabled?
Really no idea. It has to render and update the data, I don't know if this is done optimized.
4000 rows? How can a user find one?

How long does it take to render this dropdown on load with e.g hardcoded values in the data-where?
 
You might want to turn J! debug on with profiling. Then in the results you can see if the issue is server side or browser side. Also check the network tab to see how long the ajax call/response is taking.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top