Opened 11 years ago

Last modified 5 years ago

#2179 new task

Optimization of "gui sim update" needed when large groups of units are selected. — at Version 1

Reported by: RefinedCode Owned by:
Priority: Should Have Milestone: Backlog
Component: UI – In-game Keywords:
Cc: Patch:

Description (last modified by RefinedCode)

If you open up the in game profiler, and then select a large number of units you can see a huge increase to "gui sim update". In my case selecting 100 Longbowmen causes the msec/turn to increase from ~1 to ~48 which is more than a third of what the rendering takes. This causes a very noticeable choppiness in game.

I measured execution time of various functions and determined the cause of this lag stems from the many calls to GetEntityState from EntitySelection.prototype.update in selection.js. Every turn this function is called for every one of the selected units.

There is a much larger performance hit when the jsdebugger is enabled but when I took my measurements when it was off, so it would be a pretty good performance increase if the cause of this lag is fixed.

Change History (1)

comment:1 by RefinedCode, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.