Opened 8 years ago

Last modified 6 years ago

#4322 closed defect

Increase in "gui sim update" timing after r18773 — at Initial Version

Reported by: mimo Owned by:
Priority: Should Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Imarok Patch:

Description

Because of the loop lines 436/442 of gui/session/selection_details.js introduced in r18773, GetExtendedEntityState is now called for all selected entities while it was designed to complete the EntityState with the rarely used variables and be called only on rare occasions (usually only the first selected entity) when needed. Testing on Combat Demo Huge by selecting 200 units without doing anything, the "gui sim update" profile info goes from about 29ms/turn when calling only GetEntityState in that loop (so missing a few variables) to 47 ms/turn with the current GetExtendedEntityState.

  • We should then move the info needed by displayMultiple from ExtendedEntityState to EntityState and only call GetEntityState in that new loop.
  • If it happens that everything is now needed, then the distinction between EntityState and GetEntityState would have no more meaning, and they should be merged (that would simplify a bit the code, and avoid some now useless steps).
  • And maybe a way to improve performances when a lot of selected units would be to call the GuiInterface GetEntityState for an array of entities, such that all the selected units would need only one call instead of one per entity.

Change History (0)

Note: See TracTickets for help on using tickets.