- Home /
Bad Performance in Unity?
So, I posted a thread in the Unity forums earlier this week about how I was experiencing bad performance in Unity just out-of-the-blue. This was between all projects I had (new and old) and seemed to be caused by AudioManager.Update(). The audio manager would take up to 50% of Unity's CPU usage at times and would cause both the Editor and Play mode to be incredibly laggy (interestingly it also caused building my game to become so slow it was basically impossible to build). This was despite my projects having no audio in them whatsoever. I ended up fixing the issue by reinstalling Unity. Everything ran smoothly like it had before as the AudioManager.Update() method was no longer eating up CPU usage.
Unfortunately, the issue has returned upon opening Unity today; the AudioManager.Update() method was once again eating up CPU usage. Now, I could fix this problem by reinstalling Unity again, but seeing as how this issue returned I think that would just be a waste of my time. So any ideas on how to fix this?
Some things I have tried:
Reinstalling Unity
Updating Drivers
Checking for Windows Updates
Closing all other (non-essential) programs besides Unity
Deleting Library and Project Settings folders within my Projects' folders
Deleting everything related to Unity within the App Data folder.
Every single one of these (besides reinstalling Unity) has seemed to have no effect on this issue.
As a side note I don't think this is a hardware issue either, seeing as how everything else on my computer runs smoothly as it ordinarily would.
Previous Thread: https://forum.unity.com/threads/solved-bad-performance-in-unity-editor.522620/
Answer by Glurth · Mar 24, 2018 at 05:04 PM
Some other things to check:
Virus Scan: go into your antivirus program, and make sure that the unity program files are excluded from AV scanning. (At least exclude files in these folders from READ scans, though it should be ok to allow it to scan when WRITING files.) I'll grant; this does not explain why it is SUDDENLY taking longer, but it's POSSIBLE it's related to an AV update.
Windows Update: I would recommend DO NOT apply these automatically- apply on command only: This way you can test unity immediately afterward. But at this point, now that the issue has recurred... you can try rolling back your current updates with system restore. Also importrant: I try to apply only "important" windows updates, and leave the divers (usually "optional" updates) to be done manually, as needed, from the manufacturer, not Microsoft. EDIT: also you mentioned you have updated the drivers, perhaps this happened automatically, and the new version has compatibility bug? Have you tied using an older version of the driver too?)
Disk space: make sure you have sufficient free space. to handle both the install, and your windows disk cashe)
Defrag: Reinstallation COULD be resolving it because this (usully) results in less fragmented files. Suggest running a defrag operation.
Multiple sounds "cards": make sure your bios and windows are configured to use only one audio device. Sometimes I've found it neccessary to disable "on-board" motherboard devices, in BIOS, when using the same kind of device in an expansion slot.
After defragmenting my drive, rolling back my graphics card driver, and restarting my computer the problem seems to have gone away. I also restarted my computer a second time to make sure that it did not come back like last time. Hopefully it's gone for good.
If I had to guess it was the defragmenting that fixed the isssue, like you mentioned reinstalling Unity had previously fixed the issue which may have resulted in less fragmented files.
Thank you for your help!
Your answer
Follow this Question
Related Questions
Editor incredibly slow, weird profiler output. 1 Answer
Unaccounted time between: WaitForTargetFPS and GPUProfiler.EndQueries 0 Answers
Opening profiler increases FPS 1 Answer
Unity Profiler slows Unity to a crawl (basically crashes) when using square root functions 1 Answer
Is there a way to check the performance in edit-mode? 1 Answer