Skip to content
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

perf(cubesql): Improve rules loading perf #9014

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mcheshkov
Copy link
Member

@mcheshkov mcheshkov commented Dec 4, 2024

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made (if issue reference is not provided)

  • Add separate cheaper error type, without backtrace and input part
  • Avoid run-time formatting to add :
  • Avoid calls to replace when strip_prefix + to_string is enough

On my laptop it gives this:

cargo bench -- rules_loading
from ~21.5 ms to ~5.5 ms

cargo test reported time for Running unittests src/lib.rs
from ~49s to ~35s

cargo test --release reported time for Running unittests src/lib.rs
from ~6.9s to ~3.5s

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 82.22222% with 8 lines in your changes missing coverage. Please review.

Project coverage is 82.85%. Comparing base (10e47fc) to head (466bf3f).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...st/cubesql/cubesql/src/compile/rewrite/language.rs 82.22% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9014      +/-   ##
==========================================
- Coverage   82.85%   82.85%   -0.01%     
==========================================
  Files         221      221              
  Lines       78813    78807       -6     
==========================================
- Hits        65300    65294       -6     
  Misses      13513    13513              
Flag Coverage Δ
cubesql 82.85% <82.22%> (-0.01%) ⬇️

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

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

@mcheshkov mcheshkov marked this pull request as ready for review December 4, 2024 12:05
@mcheshkov mcheshkov requested a review from a team as a code owner December 4, 2024 12:05
* Add separate cheaper error type, without backtrace and input part
* Avoid run-time formatting to add :
* Avoid calls to replace when strip_prefix + to_string is enough
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