Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity sometimes works *really* fast for a few hours

Discussion in 'General Discussion' started by radiantboy, Jan 9, 2015.

  1. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,591
    Ive been using Unity for about 2 years, every month or so I get an hour or 2 where Unity will run super smooth and it's a complete joy to use, even on my HUGE scene, which is over 30 megs just for the scene file - it's as fast as it would be in a fresh almost empty scene. I can zoom right out to show thousands of buildings and sprites etc, no slow down at all - usually this would be slow as can be, and I would need to go through turning areas of my level off to get a responsiveness. But just as quickly as it arrives, it will go away, leaving Unity feeling very sluggish again. When it happens it is like magic :) I'm wondering what the cause of this could be and how I remain in super fast mode all the time :)
     
  2. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    Sounds like your computer running out of memory.
     
  3. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,591
    No it isnt that, sorry I should have mentioned that I have 16 gigs of ram, I usually have lots of ram left even when its running slow, like now Im at 73%. It's gone back to being slow right now, it was fast earlier, I wont see super fast mode for a month or so now. I will update all ym graphics card stuff it must be that :) thanks.
     
  4. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    I always think of the simple things first.
    I agree you should have plenty of ram to handle Unity and a few other things all at once.
    Good luck with figuring this out.
     
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,329
    Make a bug report with your 30megs scene (or your entire project if isn't too big). That would be a very good test case for Unity.
     
  6. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Unity is a 32-bit application, so will only use 2/3GB of your 16 gigs.
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,071
    It won't be able to use most of that until Unity 5 when it'll gain 64-bit support.
     
  8. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,973
    It's possible that you have something in your assets folder that's dragging it down. I use 4.x but I have experienced that happening with 3.x in the past. Some script or dll or shader or something that's not even being used in the game and somehow Unity still keeps seeing it and choking. Do a cleanup of your assets folders and get rid of things you're definitely not using. Hopefully that will help.
     
    wccrawford likes this.
  9. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    What's it do if it needs more than that? Crash, or swap something to disc?
     
  10. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Crash. 32-bit software typically hard limit on memory. It makes no difference weather this is real memory in ram, or fake memory on the hardrive. There are only so many addresses available.
     
  11. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    If you have Unity Pro, check the profiler.

    I have a crappy lap top (8 gigs of ram) an I'Core 3 2.4 Ghz Dual Core.
    I never expierience any of these fast and slow streaks.

    I have however, had something in Update() that I forgot to remove like instantiate a projectile that never stopped and bogged Unity out, aside from that never had an issue before.
     
  12. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,591
    Tried my project on Unity5, the profiler might have something more to it, because I immediately found 2 main problems why this was slow, it is now ALWAYS in superfast mode, ie, normal mode everyone else has been enjoying! :)

    It seems USequencer (an asset for cutscenes) was draining my cpu with many calls to something called "USTimelinePropertyEditor" - and further still my own script I had written to tweak the UI somewhere for drawing custom gizmos!! Its easy to cripple Unity and not realise, I use the profiler every day so Im confused why I never found this before, as I say Unity5s seems better!..
     
    Ony likes this.
  13. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    That limit isn't so hard if you can use a paging system, it just typically makes things too unbearably slow for use in a real-time application like Unity. It's cool for something like Photoshop to page in and out as you swap layers or do individual operations, but it's really not ok for Unity since it'd potentially have to do it every frame.
     
  14. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    30 megs? :)
     
    superpig and angrypenguin like this.
  15. gallenwolf

    gallenwolf

    Joined:
    Mar 11, 2012
    Posts:
    118
    Could it be, its that time has slowed down only for you, so everything else moves faster, relatively? XD
     
  16. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    I have this same issue, but generally with script recompilations. if I delete my library folder and start unity, all my scripts recompile really really fast. After a few hours, even if I make the smallest change to a script, it starts taking like 30 seconds to recompile. There's a bug somewhere, its a bit irritating as I tend to change something, test the change, change it again, test it again, at a fairly fast pace. Its pretty irritating to have to stare that the spinning circle for 30 seconds while I wait for my Debug.Log to be ready.