Skip to content

feat(memory): optimize collection preallocation where capacity is known#3895

Merged
ion-elgreco merged 1 commit into
delta-io:mainfrom
fvaleye:feature/preallocate-capacity-when-known
Oct 23, 2025
Merged

feat(memory): optimize collection preallocation where capacity is known#3895
ion-elgreco merged 1 commit into
delta-io:mainfrom
fvaleye:feature/preallocate-capacity-when-known

Conversation

@fvaleye

@fvaleye fvaleye commented Oct 23, 2025

Copy link
Copy Markdown
Collaborator

Description

Following this, this work implements a first round of preallocating collections when their size is known, to avoid unnecessary reallocations. This applies to Vec, HashMap (with_capacity), and other dynamically sized collections.
Preallocating memory improves efficiency and reduces overhead when the final size is known.

…cisely known

Signed-off-by: Florian Valeye <florian.valeye@gmail.com>
@github-actions github-actions Bot added binding/python Issues for the Python package binding/rust Issues for the Rust crate labels Oct 23, 2025
@codecov

codecov Bot commented Oct 23, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.73%. Comparing base (4106d43) to head (580a0e8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/core/src/writer/json.rs 0.00% 2 Missing ⚠️
python/src/filesystem.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3895      +/-   ##
==========================================
- Coverage   73.74%   73.73%   -0.02%     
==========================================
  Files         151      151              
  Lines       39371    39352      -19     
  Branches    39371    39352      -19     
==========================================
- Hits        29036    29018      -18     
  Misses       9023     9023              
+ Partials     1312     1311       -1     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roeap roeap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ion-elgreco ion-elgreco merged commit acfaee5 into delta-io:main Oct 23, 2025
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binding/python Issues for the Python package binding/rust Issues for the Rust crate

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants