serval-admin: serval-builds: Only render build details when expanded#3970
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
Collaborator
|
This is reviewable in Devin Review. |
marksvc
approved these changes
Jul 2, 2026
marksvc
left a comment
Collaborator
There was a problem hiding this comment.
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:complete! all files reviewed, all discussions resolved (waiting on Nateowami).
311e465 to
178d52c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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