Skip to content

Speedup creation of Perun reports - #384

Merged
JiriPavela merged 3 commits into
Perfexionists:develfrom
JiriPavela:performance/report-speedup
Sep 9, 2026
Merged

JiriPavela merged 3 commits into
Perfexionists:develfrom
JiriPavela:performance/report-speedup

Conversation

@JiriPavela

@JiriPavela JiriPavela commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

This PR fixes lazy loading of expensive libraries (numpy, pandas) not needed in a particular report variant, and optimizes the escape_flamegraph_svg function.

Previously, this function did more than 60 individual regex substitution passes. This commit merges eligible passes into approx. 10 passes, which greatly improves performance when generating reports from small profiles.

Pandas, numpy, and polars were all being imported eagerly when
cli_groups was imported. This commit fixes the imports such that
they are loaded lazily.
Previously, this function did more than 60 individual regex
substitution passes. This commit merges eligible passes into cca
10 passes, which greatly improves performance when generating
reports from small profiles.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (05356f0) to head (7922726).

❗ There is a different number of reports uploaded between BASE (05356f0) and HEAD (7922726). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (05356f0) HEAD (7922726)
coverage-ubuntu-3.11 1 0
coverage-ubuntu-3.10 1 0
coverage-ubuntu-3.14 1 0
coverage-ubuntu-3.13 1 0
coverage-ubuntu-3.12 1 0
coverage-macos-3.12 1 0
coverage-macos-3.10 1 0
coverage-macos-3.14 1 0
coverage-macos-3.11 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #384      +/-   ##
==========================================
- Coverage   98.36%   91.05%   -7.32%     
==========================================
  Files         182      183       +1     
  Lines       11211    11230      +19     
==========================================
- Hits        11028    10225     -803     
- Misses        183     1005     +822     
Flag Coverage Δ
coverage-macos-3.10 ?
coverage-macos-3.11 ?
coverage-macos-3.12 ?
coverage-macos-3.13 91.05% <100.00%> (+0.01%) ⬆️
coverage-macos-3.14 ?
coverage-ubuntu-3.10 ?
coverage-ubuntu-3.11 ?
coverage-ubuntu-3.12 ?
coverage-ubuntu-3.13 ?
coverage-ubuntu-3.14 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JiriPavela
JiriPavela marked this pull request as ready for review September 9, 2026 16:47
@JiriPavela
JiriPavela merged commit 990b24c into Perfexionists:devel Sep 9, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant