8000 Prevent Chrome from crashing on large function lists. by macetw · Pull Request #858 · gcovr/gcovr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prevent Chrome from crashing on large function lists. #858

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

Merged
merged 8 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Load 8000 ing
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ New features and notable changes:
- Use different color for partial covered lines in HTML report. (:issue:`839`)
- Add support to generate LCOV info files. (:issue:`830`)
- Add support for FIPS enabled OS when used with Python 3.9. (:issue:`850`)
- Reduce file size for detailed HTML reports by using CSS to link the function lists. (:issue:`840`)
- Ignore all negative hits if :option:`--gcov-ignore-parse-errors` is used. (:issue:`852`)
- Reduce file size for detailed HTML reports by merging columns the function lists. (:issue:`840`)
- Use literal options for sorting and TXT metric. (:issue:`867`)

- The :option:`-b`, :option:`--txt-branches` and :option:`--branches` are deprecated, use :option:`--txt-metric` instead.
Expand All @@ -49,6 +49,7 @@ New features and notable changes:
- The :option:`--sort-uncovered` and :option:`--sort-percentage` are deprecated, use :option:`--sort` instead.
The reason for this is that only one sorting order shall be selectable and and an enumeration is easier to handle
than several flags.
- Split list of functions into tables with maximum 10000 rows to fix rendering issues. (:issue:`858`)

Bug fixes and small improvements:

Expand Down
6 changes: 4 additions & 2 deletions gcovr/formats/html/default/functions_page.content.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{# -*- engine: jinja -*- #}
{% for function_batch in all_functions | batch(10000) %}
<table class="listOfFunctions">
<tr>
<th>Function (File:Line)</th>
<th>Call count</th>
<th>Block coverage</th>
</tr>
{% for entry in all_functions %}
{% for entry in function_batch %}
<tr>
{#- #}<td><a href="{{ entry['html_filename'] }}#l{{ entry['line'] }}">{{ entry["name"] }} ({{ entry["filename"] }}:{{ entry["line"] }})</a></td>
{#- #}<td>
Expand All @@ -19,5 +20,6 @@
{#- #}<td>{{ entry["blocks"] }}%</td>
{#- -#}
</tr>
{% endfor %}
{% endfor %}
</table>
{% endfor %}
14 changes: 8 additions & 6 deletions gcovr/formats/html/github/functions_page.content.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{# -*- engine: jinja -*- #}
{% for function_batch in all_functions | batch(10000) %}
<table class="m-3 text-mono text-small listOfFunctions" style="width:100%;">
<tr class="text-left">
<th>Function (File:Line)</th>
<th>Call count</th>
<th>Block coverage</th>
<tr class="text-left">
<th>Function (File:Line)</th>
<th>Call count</th>
<th>Block coverage</th>
</tr>
{% for entry in all_functions %}
{% for entry in function_batch %}
<tr>
{#- #}<td><a href="{{ entry['html_filename'] }}#l{{ entry['line'] }}">{{ entry["name"] }} ({{ entry["filename"] }}:{{ entry["line"] }})</a></td>
{#- #}<td>
Expand All @@ -19,5 +20,6 @@
{#- #}<td>{{ entry["blocks"] }}%</td>
{#- -#}
</tr>
{% endfor %}
{% endfor %}
</table>
{% endfor %}
0