Skip to content

serval-admin: serval-builds: Only render build details when expanded#3970

Merged
marksvc merged 1 commit into
masterfrom
fix/serval-builds-ui-performance
Jul 2, 2026
Merged

serval-admin: serval-builds: Only render build details when expanded#3970
marksvc merged 1 commit into
masterfrom
fix/serval-builds-ui-performance

Conversation

@Nateowami

@Nateowami Nateowami commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

On my decently powerful dev machine, the serval builds tab is laggy.

Running document.querySelectorAll('*') shows there are about 31,000 elements on the page. By way of comparison, the generate draft page for a project with one current and one historical draft in my testing is 308.

The high number of elements on the serval builds tab is mostly caused by always rendering build details even for rows that are collapsed. This means layout has to be calculated and Angular runs change detection for things that aren't visible.

My testing shows that about 7.05 times as many elements as needed were being used to render the page. Most likely that means that we can now show 7 times as many builds before running into performance issues, though it also depends on the relative cost of change detection for the rows vs the details. If I had to guess I suspect the detail section is more computationally expensive to change detect, and therefore the ratio could be much higher than 7.

@marksvc For what it's worth, it looks like the elements were given a height of zero and not set to display: none, meaning not only were they in the DOM and subject to change detection and memory consumption, but the layout/rendering engine had to process them.


This change is Reviewable

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.04%. Comparing base (0ab7def) to head (178d52c).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3970   +/-   ##
=======================================
  Coverage   81.04%   81.04%           
=======================================
  Files         645      645           
  Lines       41434    41434           
  Branches     6724     6748   +24     
=======================================
  Hits        33581    33581           
+ Misses       6760     6747   -13     
- Partials     1093     1106   +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Nateowami Nateowami temporarily deployed to screenshot_diff June 26, 2026 02:33 — with GitHub Actions Inactive
@marksvc marksvc self-assigned this Jul 2, 2026
@marksvc

marksvc commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

This is reviewable in Devin Review.

@marksvc marksvc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good; thank you. That was a nice, clean change. There will be more room for performance improvement that we can evaluate as we fill this with data and in different situations.

@marksvc reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Nateowami).

@marksvc marksvc force-pushed the fix/serval-builds-ui-performance branch from 311e465 to 178d52c Compare July 2, 2026 16:19
@marksvc marksvc enabled auto-merge (squash) July 2, 2026 16:19
@marksvc marksvc temporarily deployed to screenshot_diff July 2, 2026 16:25 — with GitHub Actions Inactive
@marksvc marksvc merged commit 76d6195 into master Jul 2, 2026
23 of 24 checks passed
@marksvc marksvc deleted the fix/serval-builds-ui-performance branch July 2, 2026 16:27
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.

2 participants