balancednetwork / balanced-backend

Backend to balanced stats page and other services
Apache License 2.0
0 stars 1 forks source link

Batch commits #74

Closed CyrusVorwald closed 2 weeks ago

CyrusVorwald commented 2 weeks ago

session.commit() should be called as bulk operations outside of loops, such as in balanced_backend/cron/pool_stats.py

robcxyz commented 2 weeks ago

Most of these commits that are in line with the session.add/merge were from debugging / have little performance penalty in general.

RE pool_stats / commit outside loop - these loops generally are way too big to commit that much data outside of it. Would have memory issues.