Ticket #129 (closed task: fixed)

Opened 7 years ago

Last modified 13 months ago

Opportunities for optimization (startup)

Reported by: jan Owned by:
Priority: Nice to Have Milestone: Alpha 1
Component: Core engine Keywords:
Cc:

Description (last modified by Matei) (diff)

  • tc_CalculateVariationKey: 1.72362 s (8010x): graphics/objectmanager.cpp

TODO (for some efficiency): use the pre-calculated choices for this object, which has already worked out what to do for props, instead of passing the selections into BuildVariation? and having it recalculate the props' choices. Release mode: 38.6697 ms

  • Gamesetup/config.cpp: 300ms

g_ConfigDB.Reload(CFG_SYSTEM); 216ms LoadGlobals?(); 64ms Release mode: 60ms

  • plain_transform: 500ms

flipping font texture files vertically. fix: convert them to e.g. DDS (possibly compressed, if that looks ok?!) same thing for art/textures/particles/sprite cursors also require runtime conversion. ironically enough, being DDS means they have to be converted back to TGA's BGR ordering (required by Windows for cursors) Release mode: 5ms

  • CSimulation init: 5000ms Now about 600ms.
  • font load: 350ms (total for 12 fonts) mostly spent building display lists. Better to store coords and render quads in immediate mode? Or use vertex arrays?
  • GUI init: 900ms (having subtracted font load time)

[more will be added as they are found]

Change History

comment:1 Changed 7 years ago by jan

  • Description modified (diff)

Most of these turn out to be non-issues in release mode. Unfortunately the overhead in debug mode is considerable and I don't see an easy to way to alleviate that, so running in release mode as much is possible is recommended.

comment:2 Changed 7 years ago by jan

  • Description modified (diff)

With exception of GUI (haven't drilled down into that) and possibly font loading, time into main menu is looking quite good.

comment:3 Changed 7 years ago by Matei

  • Description modified (diff)

comment:4 Changed 3 years ago by anonymous

  • Milestone ASAP deleted

Milestone ASAP deleted

comment:5 Changed 3 years ago by wacko

  • Milestone set to Backlog

comment:6 Changed 13 months ago by k776

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Backlog to Alpha 1

This ticket is years old and any changes made for it made it into Alpha 1.

If we ever want to optimise startup then we'll start from scratch with profiling everything again.

Note: See TracTickets for help on using tickets.