Open reinamora137 opened 1 month ago
py-spy record -o profile.svg -- python start.py
baseline:
This is after the logger update optimization
This is after both optimizations
example after updates with many trx in block:
Block: 835230 (1.98s, hashes: L:ceff1 / TX:1cd19 / M:9999c / S:7 / S20:6) Block: 835231 (1.51s, hashes: L:N/A / TX:147f6 / M:8056f / S:0 / S20:0) Block: 835232 (3.38s, hashes: L:47aff / TX:349b9 / M:eb2d7 / S:174 / S20:174) Block: 835233 (2.01s, hashes: L:28748 / TX:fc255 / M:2d396 / S:6 / S20:6) Block: 835234 (4.13s, hashes: L:0265f / TX:9bd73 / M:d3668 / S:293 / S20:293) Block: 835235 (6.72s, hashes: L:34d87 / TX:6ce89 / M:1909a / S:527 / S20:527) Block: 835236 (2.57s, hashes: L:52dfb / TX:840a2 / M:0d0b6 / S:85 / S20:85)
This is the process flow for models.py
Entire process flow for reference
Always more to improve, but this was the PR for above
https://github.com/stampchain-io/btc_stamps/pull/267
py-spy record -o profile.svg -- python start.py
baseline:
This is after the logger update optimization![profile-post-logger-upd](https://github.com/stampchain-io/btc_stamps/assets/6529957/112b27e1-8bc7-48e4-9a6c-25583df6d879)
This is after both optimizations![profile](https://github.com/stampchain-io/btc_stamps/assets/6529957/a8edbc6d-cd07-423a-b435-e1bcd96292fb)
example after updates with many trx in block: