View Issue Details

IDProjectCategoryView StatusLast Update
0004756The Dark ModCodingpublic11.06.2018 09:42
Reporterstgatilov Assigned Tostgatilov  
Status assignedResolutionopen 
Product VersionTDM 2.06 
Summary0004756: Optimize memory handling in LWO loading
DescriptionWhen LWO model is loaded, some temporary structures are created. These structures include a huge number of small separately-allocated memory buffers. While this works tolerable in final release, it takes a lot of time when programmer attaches a debugger (even if he runs Release build), because debugger usually redirects allocations to some sort of "debug heap".

The idea is to create a memory arena/zone for all the temporary LWO structures. During LWO loading, all these small buffers will be allocated with special zone allocator (linear allocator which chunks). When LWO is loaded, all the memory in the zone is deallocated with single call.
Steps To ReproduceGet the (Bikerdude at al)'s "city" map from the related issue 4753.
Start game with debugger attached and write "map city" in console.
Go to idRenderModelStatic::InitFromFile, find line with LoadLWO call. Try to see how long lwGetObject and lwFreeObject take.
TagsNo tags attached.


related to 0004753 resolvedstgatilov High RAM useage over time: TDM is crashing to desktop 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
22.03.2018 05:20 stgatilov New Issue
22.03.2018 05:20 stgatilov Status new => assigned
22.03.2018 05:20 stgatilov Assigned To => stgatilov
22.03.2018 05:20 stgatilov Relationship added related to 0004753
11.06.2018 09:42 stgatilov Target Version TDM 2.07 =>