Skip to content

Conversation

@cconard96
Copy link
Contributor

@cconard96 cconard96 commented Oct 17, 2025

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.

Description

Rendering the templates/components/itilobject/layout.html.twig template can take over 200ms even with only a few timeline items, The goal of this PR is to reduce the amount of things in the templates and reduce the amount of redundant calls to get user info cards.

  • Move some JS related to the timeline to a JS script file.
  • Lazy-load user info cards when needed only (on hover).
  • Prevent fetching duplicate cards.

Before with the timeline tab content only:
64.8kb compressed (529 actual) at 260-340ms
After with the timeline tab content only:
59kb compressed (421 actual) at 250-320ms. Response size grows much less than before with timelines with a lot of items/actors.
Visual perception of timeline loading seems faster. Difference seems more noticeable on tickets with a lot of followups/tasks.

Only a slight delay loading user card tooltips on demand, but this also doesn't work until the timeline loads completely.
Performance should increase as less timeline HTML needs sent back to the browser. There is a ton of duplicated boilerplate stuff still.

For reference, in my Vue test I am only pulling 5.4kb of data for the same ticket and timeline items combined and can render the entire ticket timeline view in less than a second even with developer tools enabled and refreshing the page to bypass SPA. Only some data is missing due to the API not supporting it yet, but the majority is there. Also, The HLAPI could certainly stand to be optimized so the Vue app could be even more performant than currently seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant