[eluser]JanDoToDo[/eluser]
Hey guys,
My client has a tree-view on his website however there is a lery large amount of data in the tree view and as such it is taking around 1-2 seconds to load on every page refresh. The treeview is loaded via a jquery load on document ready.
I cached the files using mp_cache and this helped by about 0.2s however it still takes a long time to load. Is there anyway to compress the output to reduce the size or do anything else with it?
I profiled the whole thing and its the echo start which returns output to the jquery ajax call which takes the time (presumably as it is being downloaded by the client)
I thought about :
1) gzipping it and so set the config to enable_compression but this doesnt work as the jquery output is called after data has been sent and so it doesnt compress and comes up with an error. Is there anyway to compress it otherwise?
2) multiple echo statements but figured this wouldnt help as its still the same amount of data.
3) The third thing i thought of was only loading sections when they are clicked on but this isnt optimal.
Does anyone have any suggestions??
I think the most optimal would be if there is someway to compress the data, or alternatively store the tree client side instead of server side?