As templates values may change (with techs or auras), templates are reloaded each turn by the gui. As new techs or auras are not so frequent, that's not necessary and quite time consuming as even with only one unit selected, all templates in its productionQueue have also to be loaded again.
The patch only reload them when something has changed.
Details
Check that nothing is broken in the gui
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 4684 Build 8135: arc lint + arc unit
Event Timeline
My approach is a bit different though, wouldn't it be possible to only reload all the changed templates and not all templates of a player if something changed?
(also, are you planning more of these gui sim update performance related changes? I want to avoid that we do double work and am currently (and have been for a while) trying to improve the performance of selection gui updates)
but as gui time is a real concern, that's not so unexpected. And that's good for a good (and fast) review that you already looked at this problem :-)
I think that is the case in the patch: templates are reloaded only when needed (not all of them).
I didn't know you were still working on it. If you do, that's fine, i'll won't continue (nothing else in my current plans about it).
Ok, at least I will review this patch (I think it's fine, but I will need to get svn to apply the patch as it doesn't seem to apply on the latest state of the git mirrors, so will need about 30 minutes before I can test it).
Only thing I can think of is that maybe templateDataStatus could be renamed to modifiedTemplates, GetTemplateDataStatus to IsTemplateModified, but am not sure if that would be an improvement.
binaries/data/mods/public/gui/session/session.js | ||
---|---|---|
488 | leftover argument from a previous version of the patch, will be removed. |