Static analyzer result pages filter checkboxes are slow
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
E.g., for WebKit clicking "All Bugs" checkbox on https://build.webkit.org/results/Apple-Sequoia-Safer-CPP-Checks/302370%40main%20%285930%29/scan-build-output/StaticAnalyzer/WebCore/index.html can take quite a bit of time.
This is because the script goes row-by-row and changes the `display` property value of each row independently.* It would be much quicker if it used CSS better. For instance, the script could toggle enable/disable classes on the `table` element and CSS could use that in combination with the row classes to hide the relevant rows.
---
*I based this on this code which is not good for rendering performance:
```
function SetDisplay(RowClass, DisplayVal)
{
var Rows = document.getElementsByTagName("tr");
for ( var i = 0 ; i < Rows.length; ++i ) {
if (Rows[i].className == RowClass) {
Rows[i].style.display = DisplayVal;
}
}
}
```
Contributor guide
Research direction
Load the linked static analyzer result page and trace the SetDisplay function in the result-page assets. Compare the current row-by-row filtering with table-level classes and row CSS, then verify that the checkboxes still show the correct rows and respond faster.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100