Skip to content

Make o.e.index.codec.ForUtil a pure utility class#107348

Merged
original-brownbear merged 1 commit intoelastic:mainfrom
original-brownbear:for-util-static
Apr 11, 2024
Merged

Make o.e.index.codec.ForUtil a pure utility class#107348
original-brownbear merged 1 commit intoelastic:mainfrom
original-brownbear:for-util-static

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

We've run into heap dumps that had instances of this class consume tens and in one case more than a hundred MB of heap.
It seems reasonable to use a thread-local for the tmp long array and trade the cost of looking up the thread-local for the memory savings and cycles saved for allocating and assigning instances and from moving to a static call everywhere.

We've run into heap dumps that had instances of this class consume tens
and in one case more than a hundred MB of heap.
It seems reasonable to use a thread-local for the `tmp` long array
and trade the cost of looking up the thread-local for the memory
savings and cycles saved for allocating and assigning instances.
@original-brownbear original-brownbear added >non-issue :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Apr 11, 2024
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.14.0 labels Apr 11, 2024
Copy link
Copy Markdown
Contributor

@iverase iverase left a comment

Choose a reason for hiding this comment

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

interesting approach , lgtm

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Ignacio!

@original-brownbear original-brownbear merged commit 801b013 into elastic:main Apr 11, 2024
@original-brownbear original-brownbear deleted the for-util-static branch April 11, 2024 10:16
craigtaverner pushed a commit to craigtaverner/elasticsearch that referenced this pull request Apr 11, 2024
We've run into heap dumps that had instances of this class consume tens
and in one case more than a hundred MB of heap.
It seems reasonable to use a thread-local for the `tmp` long array
and trade the cost of looking up the thread-local for the memory
savings and cycles saved for allocating and assigning instances.
@original-brownbear original-brownbear restored the for-util-static branch November 30, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Geo Indexing, search aggregations of geo points and shapes >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants