[#73847] Improve backlogs "Show x more items" frontend performance#22743
Conversation
|
Caution The provided work package version does not match the core version Details:
Please make sure that:
|
myabc
left a comment
There was a problem hiding this comment.
This looks good code-wise. I haven't yet tested locally.
There was a problem hiding this comment.
Change looks good and solid. On my machine, with 1000 work packages rendered on clicking the loading button, the time spent in the front end drops from 6 seconds to 300ms which is quite substantial.
Regarding the architecture I wonder if using a custom event wouldn't be cleaner. The BacklogController would be remain responsible for listening in on turbo:visit and for determining the id of the displayed work package from the url. It could then send a custom event the StoryControllers listen to. But in the end, it is not really changing the number of listeners so I am undecided.
The main bottleneck now seems to be the frontend rendering. Out of the ~3 seconds it takes the backend to answer when the loading button is clicked, ~2.99 s is spent in the view. The data itself is loaded quickly although that could also be because of the simplified test data i created.
Ticket
https://community.openproject.org/wp/73847
What are you trying to accomplish?
Improve the performance of the "Show X more items" link.
What approach did you choose and why?
StoryControlleras outlets in theBacklogsController. Having a large number of stories used as outlet gives a high performance hit to the rendering. It takes up more than 2/3rd of the loading time.StoryController.In my local environment using 1000 work packages, the processing time is reduced from 24 seconds to 1.7 seconds..
Screenshots
Before:

After

Merge checklist