-
Notifications
You must be signed in to change notification settings - Fork 42
filter for logs #1347
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
base: main
Are you sure you want to change the base?
filter for logs #1347
Conversation
carlhoerberg
left a comment
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.
Haven't tested but the code looks generally sound, except we prefer the function declarations instead of assignments.
static/js/logs.js
Outdated
| } | ||
|
|
||
| // Build Table | ||
| const buildRow = (log) => { |
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.
prefer function declaration to assignment
| const buildRow = (log) => { | |
| function buildRow(log) { |
| const INITIAL_ROWS = 1000 | ||
| const ROWS_PER_FLUSH = 200 | ||
| const BOOT_MIN_LOGS = INITIAL_ROWS | ||
| const BOOT_MAX = 10000 |
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.
We wait 10s or for 1000 lines to arrive before doing first rendering? I think that might be a bit too long.
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.
The idea was a high enough threshold that would avoid too much flutter if theres a lot of backlog, but can absolutely bring it down. Would 500ms feel better?
In my testing, 500ms still allows the loading status to appear and renders batches without too much repainting. WDYT?
WHAT is this pull request doing?
HOW can this pull request be tested?