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

Performance updates #152

Merged
merged 4 commits into from
Jun 4, 2024
Merged

Performance updates #152

merged 4 commits into from
Jun 4, 2024

Conversation

dimkarakostas
Copy link
Member

All Submissions:

  • Have you followed the guidelines in our Contributing documentation?
  • Have you verified that there aren't any other open Pull Requests for the same update/change?
  • Does the Pull Request pass all tests?

Description

  • When applying the metrics, only the distribution of block production is needed and not the entities. This PR changes the data that each metric function gets from a dictionary (of entities to number of blocks) to an ordered list of block amounts. This makes the metrics much faster. Also the ordering is applied only once at the analyzer level.
  • The variables that store the parsed and mapped data are very large. Before they were stored indefinitely in the execution loop of the main function, which resulted in a very high memory consumption (esp. when multiple ledgers were analyzed). By abstracting the processing to a separate function and storing the mapped data only when needed, the memory is released when not needed, reducing consumption.

Copy link
Member

@LadyChristina LadyChristina left a comment

Choose a reason for hiding this comment

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

LGTM

@LadyChristina LadyChristina merged commit 4816892 into main Jun 4, 2024
1 check passed
@LadyChristina LadyChristina deleted the metrics_computation branch June 4, 2024 15:18
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.

2 participants