-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Realm on UWP causing Massive MonoCompile.Tick() times in Unity #3413
Comments
Is there a minimal repro project you can upload here that would allow us to try and debug the issue locally? It's not something I've seen previously, so my guess is that it's not happening in all cases, which is why a repro project would go a long way. |
Will try to see if I can reproduce this in a new project then as it would be hard to share this project |
@nirinchev Is there a contact e-mail with which I should share this zip it is a little to big for the git upload limit |
You can send it to me - nikola.irinchev@mongodb.com. |
What happened?
Recently we included realm in our unity project and noticed that when switching to mobile platfroms the performance was consistent, however when switching to UWP after switch compilations a MonoCompile.Tick() would appear lasting for around 4 minutes. I did some digging and found it was nothing to do with local defines or scene differences between platforms and that the delay immediately goes away if I disable realm.
I download Editor Iteration Profile for unity to check this and found that on mobile unity's
UnityEditor.CoreModule.dll!UnityEditor.Scripting.ScriptCompilation::EditorCompilationInterface.TickCompilationPipeline() [Invoke]
lasts about 211 ms and has a GC alloc size of 30.5 MB
UWP on the other hand had
245556 ms with a GC alloc of 3.22GB
I tried to get more info with the deep profiling but I always run out of memory before I can get more information, but one of the most obvious differences is that the GC alloc itself has 99977017 calls. the mobile only has 59817 for context.
I have been suspecting it is something to do with our UWP version of realm but am unsure how to debug this further with my memory limitations.
UWP:
Mobile:
(I should note that after the compile is over everything works fine, it's just that the platform switch takes up a LOT of our time currently.)
Repro steps
Setup a project with realm in unity and have it ready for multiple platforms.
Switch platforms to something like mobile and it should be very reasonable
Switch to UWP and after the switch the MonoCompile.Tick() should be drastically longer
Version
11.0.0
What Atlas Services are you using?
Local Database only
What type of application is this?
Unity
Client OS and version
Windows 10 (KB5028166) (I think also iOS but unsure)
Code snippets
No response
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: