collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
290 stars 167 forks source link

Implement AJAX Summary Displays. #1462

Closed bri-gaia closed 2 months ago

bri-gaia commented 1 year ago

Add option to render summary displays using AJAX.

collectiveaccess commented 1 year ago

This is PR with changes in 23 files. Can you provide something more than a one line description of what you're trying to accomplish here, and why it is necessary?

bri-gaia commented 1 year ago

Some of the data we are displaying in the summary tab is quite heavy, so we implemented AJAX loading so that the page would render immediately and we could show a loading graphic.

By individually loading in the data elements the smaller requests can be populated without being held up by the more intensive queries.

I have requested that my tech lead provide additional context to this PR if possible.

kehh commented 1 year ago

@collectiveaccess what @bri-gaia has put above is pretty much the gist of it. Essentially very complex templates can take some time to render especially if they are traversing many relationships / aggregating values from all descendants. This allows the page to render without being held up by slower templates.

kehh commented 1 year ago

There's a switch for this functionality in app.conf - that could be defaulted to off if you prefer?

bri-gaia commented 1 year ago

Additional info:

Apologies for the massive PR.