Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Profiler: Cleanup Unused Cached Data

Discussion in 'Android' started by Texaggie96, Apr 13, 2012.

  1. Texaggie96

    Texaggie96

    Joined:
    Jan 23, 2009
    Posts:
    81
    I was profiling one of our games and I noticed a spike in profiler. The description of the item is "Cleanup Unused Cached Data". I haven't see this before, and a google of the problem brought nothing up. This causes a significant hitch in performance. Does anybody have a better description of what this entails (what is this cached data)? and possibly solutions to "clean up" more frequently to avoid this hit at one time?
     
  2. bekiryanik

    bekiryanik

    Joined:
    Jul 6, 2014
    Posts:
    191
    I have same problem. Mine has TextRendering.Cleanup also. Does anyone know what could be the problem?
     
  3. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    same here, anyone know why is so?
     
  4. bekiryanik

    bekiryanik

    Joined:
    Jul 6, 2014
    Posts:
    191
    Hello again,

    I was actually thinking that my projects have lags because of unused cached data but after a lot of sources, i have realized that there are other problems with my project and the actual problem is different;

    - First of all i have changed all of my 3D objects from high-mid poly to low poly.
    - Then i decreased material use in screen. For instance: previously i had around 1000 materials in my game screen, after that i used an asset that gathers textures into one texture, i gather textures into one texture and now i have 50-100 materials in my game screen. Right now i don't exactly remember the name of the asset that i use to gather all texture in my screen into one texture and material. When i remind it, i will tell you.
    - I was doing create prefab object and destroy it when it came a certain point in screen. I changed this as this;
    --> I put all object prefabs that i want to create during game play, in my game screen and i made them invisible and after the game is started, i made them visible when i need to use them and after they arrive the point that they need to be destoried, i made them invisible. For short, i prevent create and destory function during game play by doing this circle. This also prevents to happen unused cache data.

    These steps what i did above, gave me a lagless game. My game is now working like a charm. If you are looking for cleaning up unused cached data to prevent lag, first of all try these steps and then if you still have lag, check your codes.

    I hope this helps you guys.
    Best regards.