llvm / llvm/llvm-project

Static analyzer result pages filter checkboxes are slow

Open
#165,839 3 comments 0 reactions 0 assignees View on GitHub
clang:static analyzer performance
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.