Skip to content

Cache V8 heap stats instead of querying them on every call#4778

Open
joshua-spacetime wants to merge 1 commit intomasterfrom
joshua/cache-heap-statistics
Open

Cache V8 heap stats instead of querying them on every call#4778
joshua-spacetime wants to merge 1 commit intomasterfrom
joshua/cache-heap-statistics

Conversation

@joshua-spacetime
Copy link
Copy Markdown
Collaborator

Description of Changes

Previously we would invoke V8's GetHeapStatistics on every reducer call in order to compute the memory_allocation part of its ExecutionStats. We already sample heap statistics periodically, so now we cache the result after each sample and just read the cached value after each call. Memory allocation is used for energy tracking and so eventual consistency is fine.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

Refactor/optimization

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