1. Become a closed-alpha partner on the new Facebook games platform. Read more about it here.
  2. Enter the Samsung TIZEN App Challenge for a chance to win prizes. Read more about it here.

Profiler: Cleanup Unused Cached Data

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

  1. Texaggie96

    Texaggie96

    Joined:
    Jan 23, 2009
    Messages:
    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
    Messages:
    135
    I have same problem. Mine has TextRendering.Cleanup also. Does anyone know what could be the problem?
     
  3. idurvesh

    idurvesh

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

    bekiryanik

    Joined:
    Jul 6, 2014
    Messages:
    135
    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.