Skip to content

Fix overallocations#2909

Merged
texodus merged 1 commit intoperspective-dev:masterfrom
timbess:feature/decrease-max-heap-loading-data
Feb 1, 2025
Merged

Fix overallocations#2909
texodus merged 1 commit intoperspective-dev:masterfrom
timbess:feature/decrease-max-heap-loading-data

Conversation

@timbess
Copy link
Contributor

@timbess timbess commented Jan 31, 2025

This fixes a couple of places where we're overallocating.

  1. Reserve vocabs while loading arrows into perspective to prevent overgrowth.
  2. Free data tables and protobuf messages before processing the table to minimize the concurrent copies of the data in memory.

1. Reserve vocabs while loading arrows into perspective to prevent overgrowth.
2. Free data tables and protobuf messages before processing the table to minimize the concurrent copies of the data in memory.

Signed-off-by: Timothy Bess <[email protected]>
@timbess timbess force-pushed the feature/decrease-max-heap-loading-data branch from e0f7436 to 47f1672 Compare January 31, 2025 20:29
@timbess timbess marked this pull request as ready for review January 31, 2025 21:13
Copy link
Member

@texodus texodus left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good!

We should consider adding heap benchmarks to our benchmark suite.

@@ -1061,16 +1064,16 @@ Table::from_cols(
<< dtype_to_str(data_table.get_column(col_name)->get_dtype())
Copy link
Member

Choose a reason for hiding this comment

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

This should be data_table->get_column also, but did not cause a compile error in CI because it is only compiled in debug builds.

@texodus texodus added the enhancement Feature requests or improvements label Feb 1, 2025
@texodus texodus merged commit 0699018 into perspective-dev:master Feb 1, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests or improvements

Development

Successfully merging this pull request may close these issues.

2 participants