Hi eveyone. Thank you watch this.
When I created a new script by Right click->Create->C# Script, unity will take 1.5 to 2 minutes to import the script, which is unbearably slow.
But when I opened the Import Activity window, I found that the import time of the script only took 16 milliseconds.
Then I tried to use the same project on my colleague’s computer to perform the same operation of creating scripts, and his speed was very fast, the import bar disappeared almost instantly and then entered the compilation stage.
I don’t know why the result of Import Activity and what I’m actually waiting for are so different. If anyone can give me some hints, I will be very grateful.
I find something in profiler.
It seems to be because the SyncVS.PostprocessSyncProject function calls the GC.alloc function more than 1.6 million times. According to the function name of the call chain, I guess that unity has imported all assets, but from this point of view, it seems that the time is too short.
What IDE integration package and what version are you using? Searching this up reveals an old issue tracker where this looks to have been fixed at some point: Unity Issue Tracker - Creating a new code file causes long stalls in SyncVS.PostprocessSyncProject - Visual Studio
Just in case, my computer is not weak, and the project is also stored on a Samsung SSD.
Very thank you, u save my ass! I’m using rider for write code. My poject Rider plug-in is 3.0.17, when i upgrade to laset version 3.0.24. Boom! The problem is solved! Thank you again, have a nice day!