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

* 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
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.68%. Comparing base (3e203e8) to head (44cfefa).
Report is 1 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.68%   82.68%   -0.01%     
==========================================
  Files         221      221              
  Lines       78474    78468       -6     
==========================================
- Hits        64890    64879      -11     
- Misses      13584    13589       +5     
Flag Coverage Δ
cubesql 82.68% <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
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