date | version | Explanation | Author |
---|---|---|---|
2019-8-15 | 1.0 | The initial version of the document | Li Jun |
Resource Leak
-
Uniform Resource Load
DKAssetManager: LoadObjectSync
DKAssetManager: LoadObjectAsync each has a unique guid load -
Contrast resource snapshot
into the main city of the time, the following snapshot, snapshots guid
after a period of time and other games, and then the next snapshot, get the difference guid
The code leak
- Callback leak
shut down the cache, compared to growth of callback sources - The key target release
ui object releases End, find references path - Table detecting large
global conveniently find the table 100 contains more elements than the above given path - Configuration table
format conversion table and release large configuration logic configuration, export format does not meet the demand, a new generation was originally a sort table - + Table.const speed up garbage collection
garbage collection parameters increased to 600 table.const the same configuration table xlua new clearnull, c # test found objects destroy the advance cleared quote
Resource consumption
-
Resource format
texture readwrite enable mipmap mesh readable, pay attention to save the mesh asset, double the memory, with fbxexporter -
rt
some component implementation, such as shadowproject, in ondisable time, full-screen interface is not deleted rt rt rt consideration of non-implementation -
ShaderLab
Standard clean-up, clean-up material ball, with clean-up fbx default shader uber.shader accounted 20M shader clear reference to the default map -
Atlas
small Atlas strategy, it can not close the batch, and the width and height is an integer multiple of 4, consider Figure scattered dynamically loaded separately from the static reference map -
Effects
delete unwanted nodes -
ui prefab
pictures node interface will modify the image, do not drag map -
Shaders
clean up useless references
Resource Management
-
From the whole cache, positive change to focus on the release released + buffer queue
-
To minimize the global cache + buffer queues into asynchronous
-
unload ab (false)
ab contains only one active load resources, and not be dependent on any ab loaded after the completion of ab unloadfalse, after using the load out of the asset, mainly Atlas
Black &
- QualitySettings.masterTextureLimit
Resource Production
-
Check excessive resources
-
Reduce resource reference relationship
-
Clean up useless resources