I am up to one task which might be interesting for some others:
I am programming a data administration which makes quite extensive use of reloads to keep loading times as short as possible.
In nearly every page, I have a list of items, when clicking on one of the items a form is opened to edit the item.
When the form is saved, the list has to be reloaded of course to display the changed data.
At the moment, I reload the complete list.
As the lists will grow big, the reload will become very slow. With 250 test entries loading data from 3 tables I can already feel a bit of lag.
Ok, reloading a single item of a list is the thing I want to implement, and I want to do it the ATK way as much as possible so others can use it as well.
Please tell me if my understanding of the built in reloader is correct:
- As far as I understand, the built-in reloader relies on a view object that is passed.
- The reloader uses the unique view id (#parentview_parentview_view) to identify the HTML content to reload
- The server side part of the callback just re-renders the view object and sends it back to the browser.
So theres some solutions I can think of:
Create a view object for each list item, and use jsReload on this object. This wouldn’t require any additional implementations, but creating an object for each item seems very performance-unfriendly. (but I am anything but an expert on performance, “hardly any idea” is more correct)
Implement a custom reload inside the view that creates the list. This would mean implementing an extra server-side callback I suppose, and of course some additional JS.
ATK experts, whats your opinion? Which direction should I start?