-
Notifications
You must be signed in to change notification settings - Fork 6
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
(state-indexer-logic): improvement to bulk insert state changes #362
Conversation
5baac29
to
916d953
Compare
@race-of-sloths please, include my PR in the Race |
@kobayurii Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: waiting for scoringWe're waiting for maintainer to score this pull request with What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
🥁 Score it! @khorolets, please score the PR with |
@kobayurii Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 1! Another weekly streak completed, well done @kobayurii! To keep your weekly streak and get another bonus make pull request next week! Looking forward to see you in race-of-sloths What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
This PR introduces significant improvements to the way state changes are inserted into the database. Previously, the system was making hundreds of individual requests per block, while we expected a maximum of 7 requests per block. This resulted in inefficiencies and a higher database load.
In this update, the logic for saving
state_changes
has been rewritten to use bulk inserts. Now, for each type ofstate_changes
, only a single query is executed to perform a bulk insert, reducing the number of requests drastically and improving performance.Changes:
state_changes
insertion logic to use bulk inserts.This enhancement should improve overall performance and reduce database overhead.