You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, every piece of code that need to subscribe to newHeads will create a subscription at SubscriptionManager. This seems to create issues when there are too many subscriptions.
(Thanks to @jdevcs for the suggestion)
Use Cases
This will close those 2 issues #5517 and #5519. And will improve performance for the heavy-load users who use the library to process hundreds or thousands of transactions at their backend server for example.
Implementation Ideas
Additionally, this new singleton class could be used later to abstract the logic of both subscription and polling from other classes. In a way that other classes will ask this singleton class for notification whenever a new block arrives. And this singleton class will use either subscription or polling to get every new block header and pass it to the already registered classes.
Feature Examples/References
No response
Are you willing to implement this feature?
Yes
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
Is there an existing issue for this?
Feature Request
Currently, every piece of code that need to subscribe to
newHeads
will create a subscription at SubscriptionManager. This seems to create issues when there are too many subscriptions.(Thanks to @jdevcs for the suggestion)
Use Cases
This will close those 2 issues #5517 and #5519. And will improve performance for the heavy-load users who use the library to process hundreds or thousands of transactions at their backend server for example.
Implementation Ideas
Additionally, this new singleton class could be used later to abstract the logic of both subscription and polling from other classes. In a way that other classes will ask this singleton class for notification whenever a new block arrives. And this singleton class will use either subscription or polling to get every new block header and pass it to the already registered classes.
Feature Examples/References
No response
Are you willing to implement this feature?
The text was updated successfully, but these errors were encountered: