foxostro / GutsyStorm

Game with voxel graphics similar to Minecraft. (Restart GutsyStorm with Objective-C/Cocoa)
Other
12 stars 4 forks source link

Zero fills in fullBlockLighting #45

Closed foxostro closed 12 years ago

foxostro commented 12 years ago

Startup time is slow largely because of a large number of zero-fills under fullBlockLighting. (and maybe other places too)

Investigate possible improvements to reduce this cost, such as reducing the amount of memory used for lighting data.

foxostro commented 12 years ago

About 7% of zero-fills during the "warming up" phase at app launch are under addVertex, under the call to alloc. This and fullBlockLighting are the places where the most zero-fills occur.

I wonder whether the zero-fill cost at app launch can be reduced by pre-allocating memory for GSChunkVoxelData objects in a memory pool. This will at least help ensure these objects are packed contiguously in memory.

foxostro commented 12 years ago

Moot point now. Closing.