View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004756 | The Dark Mod | Coding | public | 22.03.2018 05:20 | 11.06.2018 09:42 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | assigned | Resolution | open | ||
Product Version | TDM 2.06 | ||||
Summary | 0004756: Optimize memory handling in LWO loading | ||||
Description | When 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 Reproduce | Get 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. | ||||
Tags | No tags attached. | ||||