unity-jar-resolver
unity-jar-resolver copied to clipboard
Unity Loads for 2 minuites every single time play is pressed.
We are working on a huge project. 100k -ish files
Every single time Play is pressed on unity editor it hangs for around 2 minuites.
I tried to isolate the issue.
steps i tried. 1.) I moved from version 122 to version 150. 2.) unchecking everything that i can uncheck in the settings.
I also tried to disable every dll. in the folder. aside from the Google.VersionHandlerImpl
it still loads for an unacceptable amount of time.
This however does not happen when i try it in a empty project.
I also are unable to profile on what in the DLL's are triggering this massive spike in loading time. as the calls in a DLL does not show up in a profiler.
I can now fix the issue by importing the ExternalDependencyManager once in a while when building, and disable them after...
UNITY VERSION 2019.3.X
Hi, I think I have the same issue. Initially, I thought it was firebase dependencies, but I think it comes from the dependency manager.
Here is the result of running the profiler in Editor mode, this is caught in one of the first frames:
In my case, this IOSResolver is taking about 50% of the startup time. Note that I'm running on windows and building for android. So I don't understand why IOSResolver needs to run here.
I'm also having this problem, though for me the slowdown occurs in generate_xml_from_google_services_json.
It is the dependency manager. Removing it resolves the issue, though of course then you can't use Firebase because it has a dependency on the resolver. I'm currently working my way back from 6.13.0 on the Firebase Unity SDK to find one which includes and relies on a version of the dependency manager where this slowdown doesn't exist.
I have the same problem. Not only entering Play mode causes this issue but every compilation for me. Verbose Logging shows a lot of iOS-related stuff going on. I'm on Windows, building for Android. Unity 2019.3.9.
Here they talk a bit more of why this is happening. It would be really great to take those validation the resolver do. It's making the development process really hard. https://github.com/googlesamples/unity-jar-resolver/issues/327
Happens every time when entering play state. Adding -gvh_disable to command line and turning everything off from settings does not fix the issue. Only choice is to delete whole folder until those static constructors are fixed.
I'm also experiencing massive slowdowns on entering the playmode. (And sometimes just beeing in the editor as well)
Using EDM + Firebase Plugins
Deleting EDM + the firebase editor folders solves the issue for me. I'm still keeping them in my git in case something is ever needed.
We are too started experience lockdowns on start after installing Firebase + EDM.
We are experiencing the same behaviour on our projets. It is slowing grinding our working hours for nothing.
So, this is actually two-fold problem! It is EDM and it is Firebase plugin. Both are slowing down DRAMATICALLY.
We've removed firebase and edm from our manifest.json and adding edm and firebase on build servers (by copying separate manifest on top of main one), putting all firebase code behind compile time define 🤦🏻♂️
The change in speed incredible - we were having 10 seconds hangups on every Play, now play start instantly.
For us the main problem is in Firebase.Editor.dll which calls python process on every recompile and when entering play mode. This call takes 10 seconds on its own. Then another 5 seconds are added by IOSResolver, PlayServicesResolver, GPGSUpgrader. Waiting for 15 seconds after each compile and when entering play mode is killing us.
Sadly this is happening too in every project we have firebase. And we can confirm too that is Firebase dependency what is causing this.
This is REALLY annoying and it's complicating our development process. If we can help in anything please let us know, but we need to reduce this time.
Can we please have ANY update from the Firebase team? This wastes hours of development for every team member.
This issue is also related I think: firebase/firebase-unity-sdk#378
Same issue at my company across multiple projects.
Currently I end up deleting the play services resolver when developing code, and then having to remember to not commit to version control/re-add it when I want to do a build.
Ridiculous, and this has been an issue for years.
Same problem. Firebase + Play Services == Horrible experience for developers.
Yep it's causing issues for me too.
Still having this issue :( I'm not using Firebase - I am just using the standard Google Play services that come with the old PlayServicesResolver, which I replaced with the new External Dependency Manager.
The PackageManagerResolver, however it looks for XML files, is causing massive slowdown for us, are there any quick workarounds? Using Unity 2019.3.0f3
I manually downloaded the unreleased 1.2.157 from the root of this repository - the Package Manager Resolver issue is no longer happening!
However, VersionHandlerImpl.dll is still causing a 12~ second lag spike on every 'Play', even in an empty scene.
The problem methods seem to be:
- VersionHandlerImpl.UpdateVersionedAssetsOnMainThread()
- VersionHandlerImpl.BuildTargetChecker.CheckBuildTarget() (as here: https://github.com/googlesamples/unity-jar-resolver/issues/352#issuecomment-621103853)
- VersionHandlerImpl.UpdateVersionedAssetsOnUpdate()
Any help would be appreciated - I am using this with EasySave3, could that be causing an asset db problem?
I also noticed some people having an issue with the Version Handler when passing certain command line arguments - I open via the Unity hub, and have tested both choosing 'Android' from the dropdown menu and 'Current Platform' - no change.
Unity Hub 2.3.2 Unity Editor 2019.3.0f3
EDIT: This still happens even when adding -gvh_disable
as a flag via the Unity Hub Advanced options
EDITed again (!): I thought the results in the Profiler above were still happening even when I added -gvh_disable
as a flag via the Unity Hub Advanced options, but deleting my Library folder & relaunching Unity again made the -gvh_disable
flag work as expected.
I migrated the EDM4U to be managed by the package managed, and deleting the one folder at Library\PackageCache\com.google.external-dependency-manager@xxx
at project start-up when it is regenerated is working for now.
Hi @Vixxd
If VersionHandler is causing performance issue on your system, I would recommend you to turn off Version Handler through settings. You should find it under Assets > External Dependency Manager > Version Handler > Settings
. -gvh_disable
would work too but you will shut off Version Handler entirely and cannot manually activate it when you need to.
I would still recommend you to run Assets > External Dependency Manager > Version Handler > Update
when you upgrade Firebase, if it is installed through .unitypackage
.
If you install Firebase or EDM4U from Unity Package Manager, since UPM is managing versions, Version Handler most likely will not do anything.
Hope this helps!
We are also looking into several way to improve editor performance for both Firebase and EDM4U. Will keep you updated.
Shawn
I'm on 1.2.161 and I still see massive spikes when compiling scripts, entering and exiting playmode.
The problem is these two static intializers. They run always after assembly reload: code compilation and entering playmode.
https://github.com/googlesamples/unity-jar-resolver/blob/db7b0537ccccce8eeeade542f3a5aec3cfb9cddd/source/VersionHandlerImpl/src/VersionHandlerImpl.cs#L2301
https://github.com/googlesamples/unity-jar-resolver/blob/db7b0537ccccce8eeeade542f3a5aec3cfb9cddd/source/VersionHandlerImpl/src/VersionHandlerImpl.cs#L3086
We can't just disable the EDM as it needs to run on the build server, and there is no command line option to enable it, only disable. Luckily you can provide a command line option in Unity Hub for the project, but it's rather inconvenient as every developer needs to remember to set it for every checkout of the project.
However, it doesn't really fix the whole issue. This is profiling after -gvh_disable:
BuildTargetChecker and PackageManagerResolver are still happily chugging along.
Also, as a insult it also prints this in the log every time:
What I would like to have is a way to BY DEFAULT disable everything related to EDM, and then have a command line flag to enable it for the build server.
Can we have this in user friendly way, please? I'm compiling and running the game hundreds of times per day, and literally waiting half an hour just to EDM to do nothing really.
Hi guys. I've send a fix proposal for that performance issue on https://github.com/googlesamples/unity-jar-resolver/pull/413 please make a review and send any feedback if possible.
@felipegodias
Thanks for the PR. I will make another EDM4U release later next week. If you need the change right now, you should be able to use gradle to make a local build.
I feel pretty bad about the performance of EDM4U and will continue to push the team to improve this in the future.