perf: lazy load MGUMatch/MGUGame fields#7610
Conversation
mbergen
left a comment
There was a problem hiding this comment.
Can you test how this affects MatchTable? IIRC that's also using this.
|
|
While I like the approach, since so many m2g will need to be loaded, it may be worth batching them rather than going back and forth with the database. While the Lua time difference is negligible, the real-time difference can add up. Also, we need to look at not loading the m2g extradata field to reduce memory further |
because lazy loading is implemented through
that part is already included Lua-Modules/lua/wikis/commons/MatchGroup/Util.lua Lines 586 to 613 in 9d24c8a |
9d24c8a to
5decb63
Compare
Summary
See #7398 for context.
Some fields in MGUMatch/MGUGame are not used in certain contexts, e.g., a lot of
extradatafields inMGUGameare not needed during match results processings in standings tables. This PR adds lazy loading to such fields to reduce overall memory consumption.How did you test this change?
https://liquipedia.net/valorant/User:ElectricalBoy/Sandbox2