Skip to content

Conversation

splattael
Copy link
Contributor

@splattael splattael commented Jan 7, 2025

This PR optimizes merging line coverage:

  • Integer#to_i and NilClass#to_i showed up in stack profiler which resulted to slow down merge_line_coverage a lot
  • Array#zip created a lot of intermediate objects

These changes brought down the run time from 1m28s to 1m8s on a large resultset (GitLab).

Stack profile

Before

Screenshot from 2025-01-07 11-59-26

After

Screenshot from 2025-01-07 11-59-36

@splattael
Copy link
Contributor Author

👋 @amatsuda Do you mind reviewing this optimization?

splattael added 2 commits July 1, 2025 13:47
Prior this change `Integer#to_i` and `NilClass#to_i` showed up in
stack profiler which resulted to slow down `merge_line_coverage` a lot.

This change brought down the run time from 1m28s to 1m18s on a large
resultset (GitLab).
Create less intermediate objects.
@splattael splattael force-pushed the optimize-merge_line_coverage branch from bc059fc to 08cac5a Compare July 1, 2025 11:47
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