Closed JPSxzy8 closed 3 months ago
Nice! I will test this and get back.
This is such an impactful PR in improving the performance of rendering. Thanks for sending it across @JPSxzy8
I think the response mechanism for static analysis should be further optimized. I’ve noticed that when requesting the static analysis page, sometimes the server returns more than 10MB of data, which is mostly strings and such. When the frontend makes requests, the server dumps all the data at once to the frontend, but users may not be concerned with all the data, which can cause excessive server load.
We hope to split up reporting and use AJAX to load them in async. But we are not there yet.
this is a long-term goal, but unfortunately, my front-end skills are too weak to contribute code. I hope this feature can be implemented soon.
Describe the Pull Request
Most browsers doesn't like rendering thousands/millions of lines if not needed, so wrap (potentially) big lists in
<details>
and auto-open only if they are small (currently below 100 items)This makes the "static report" page much more responsive for big apps:
Checklist for PR
tox -e lint,test
StaticAnalyzer/tests.py
) (this PR only adds cosmetic changes to HTML, so no new tests)