-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
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