-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: attempt to fix memory leak (#161)
# Description I noticed that since my last changes #159 and #160 , there has been a very visible memory leak, specially on arb1. ![image](https://github.com/user-attachments/assets/f447e5dd-c503-4eed-bce9-3c50771bdcbd) [graph link](https://g-0263500beb.grafana-workspace.eu-central-1.amazonaws.com/goto/sjeXFwkHg?orgId=1) While I have not been able to detect where the memory leak is, this PR has several improvements that might help. # Changes - [x] Remove a couple of unnecessary Array conversions, using iterators instead - [x] Use a single logger instance in the Registry class - [x] Move block skipping logic early, avoiding unnecessary RPC calls - [x] Reuse `block` instance if already queried ## How to test Run it locally: should work ![image](https://github.com/user-attachments/assets/f2583ed1-4ebf-4d20-a53d-86824d7c7ac2) ~I'll also run it on staging for awhile before taking this PR out of draft.~ can't apply it, pulumi is not happy with me.
- Loading branch information
1 parent
990dbb7
commit b50d5b4
Showing
3 changed files
with
69 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters