-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize the dashboard JavaScript and improve things #558
Merged
JustAnotherArchivist
merged 103 commits into
ArchiveTeam:master
from
ivan:dashboard-modernization
Jun 30, 2023
Merged
Modernize the dashboard JavaScript and improve things #558
JustAnotherArchivist
merged 103 commits into
ArchiveTeam:master
from
ivan:dashboard-modernization
Jun 30, 2023
Conversation
This file contains 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
…erver now sends ~250 messages/sec
The dashboard displays 2-3 times as many jobs as it used to, and we need to do something to mitigate the performance impact.
Their performance wasn't good enough in Chrome, even on a 7950X3D.
…pre-ES6 implementation
We don't really need a dynamic !con; it's easy enough to backspace and change the number yourself.
…t Chrome Natively, browsers either make mousewheel close the context menu (Chrome on Windows), or swallow all mousewheel events while the context menu is open, doing nothing until the context menu is closed (any browser on macOS). We might want to implement that swallowing behavior later for some (browser, OS) combinations, but it's not very important.
This is the result of: rome check dashboard/dashboard.js --apply-unsafe --line-width 120 with my own manual changes to `getSummaryResponses` and the replacement of some `// comments` with `/* comments */`
More predictable, less annoying (doesn't break ctrl+a and other keys after focusing the input)
…e easier to test locally
…onds Limited to 31 max readings, to be fixed in an upcoming commit.
…rage the rate over 3 sec and remove the cap on the number of readings
…ers, not the escaped URL in the DOM Fixes #340
…at lines fit nicely (at least when there is no horizontal scrollbar)
…batchTimeWhenVisible This reduces CPU usage.
…ents This might increase performance.
…very filter change `updateAlign` was seen using a lot of CPU time in the Chrome DevTools profiler.
… outside the viewport
Inspired by SEDA's batching, of course.
This reduces CPU use by ~43% in Firefox and ~30% in Chrome. Scroll log windows to the bottom only after they are unhidden again.
…g strings in the queue This doesn't make much of a difference, but it seems pointless to batch the parsing of JSON strings, given that JSON.parse is both fairly small and likely to be hot.
JustAnotherArchivist
approved these changes
Jun 30, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many changes and the code moves that it's too annoying to fully review. But the commits look reasonable, it works well, and it's a great improvement; that's good enough for me.
Thank you!
JustAnotherArchivist
added
bug
enhancement
dashboard
Client-side dashboard only; dashboard server things should use the backend label instead.
labels
Jun 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
dashboard
Client-side dashboard only; dashboard server things should use the backend label instead.
enhancement
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.
Notable changes:
rome check
historyLines
from 1000 to 500 to compensate for many more jobs than beforecontain
andcontent-visibility
on log windowsBatchingQueue
to fix the issue that caused Chromium-based browsers to hang when returning to the tab(Dashboard escapes { and } as %7B and %7D when copying ignores from context menu #340)
&initialFilter=
URL parameter&loadRecent=0
to skip loading recent dataI had to move some
dashboard3
things to avoid confusing the two dashboard JavaScript files.I didn't test whether the Ruby still serves things correctly.
obsolete tests results for 9cf8f41
Test results with all job windows collapsed, Chrome 116.0.5817.5 (Official Build) dev (64-bit) on Windows 10 22H2 on an ancient laptop (Intel Core i7-2620M), no browser extensions:
9cf8f41 uses 55% of the CPU time of the current dashboard and ~25% as much memory.
Test results with all job windows collapsed, Firefox 114.0 on Windows 10 22H2 on an ancient laptop (Intel Core i7-2620M), no browser extensions:
9cf8f41 uses ~95% of the CPU time of the current dashboard and about the same amount of memory (it fluctuates as Firefox takes a while to do a full GC).
Unlike Chrome's Task Manager, Firefox's
about:processes
doesn't have aCPU time
column, so the difference is less measurable.Test results with all job windows collapsed, Chrome 116.0.5817.5 (Official Build) dev (64-bit) on Windows 10 22H2 on an ancient laptop (Intel Core i7-2620M), no browser extensions:
f7d5b1a uses 40% of the CPU time of the current dashboard and ~25% as much memory.
Test results with all job windows collapsed, Firefox 114.0 on Windows 10 22H2 on an ancient laptop (Intel Core i7-2620M), no browser extensions:
f7d5b1a uses ~57% of the CPU time of the current dashboard and about the same amount of memory (it fluctuates as Firefox takes a while to do a full GC).
Unlike Chrome's Task Manager, Firefox's
about:processes
doesn't have aCPU time
column, so the difference is less measurable.