Worse Performance when not plugged in!

Hey Guys!
I’m experiencing a weird behavior testing my game on a Lumia 520 here:
If I Build from Unity and then Run from Visual Studio (Master), the game runs totally fine.
If I Build Run from Unity, or if I play with the device disconnected there is a scene where the performance drops significantly to the point where it’s unplayable.
Does this make any sense? I don’t even know how to tackle this, since it’s not showing any error when plugged in and I can’t see output playing unplugged :frowning:

Does the unity player log have anything useful? From https://docs.unity3d.com/Documentation/Manual/wp8-debugging.html:

Totally forgot about that!

But no, just checked and there’s nothing unusual.
I Have some prints of he allocated memory:

Mono heap size: 0
 
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WP8SupportGenerated/UnityEngineDebug.cpp Line: 55)

Profiler.GetMonoUsedSize(): 0
 
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WP8SupportGenerated/UnityEngineDebug.cpp Line: 55)

Profiler.GetTotalAllocatedMemory(): 39
 
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WP8SupportGenerated/UnityEngineDebug.cpp Line: 55)

Profiler.GetTotalReservedMemory(): 40
 
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WP8SupportGenerated/UnityEngineDebug.cpp Line: 55)

Profiler.GetTotalUnusedReservedMemory(): 1
 
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WP8SupportGenerated/UnityEngineDebug.cpp Line: 55)

System.GC.GetTotalMemory(true): 8

What really bugs me is that it only happens on this scene so far :frowning:

Hi,

Build and Run deploys a “development build”, so it’s only natural that performance is worse than master.

I thought it deplyed a development build when the the checkbox was marked! Good to know! :slight_smile:

BUT the performance issue also happens when I build (Master) from Visual Studio and then unplug the phone to play =(

Could it be the phone throttles the CPU/GPU when on battery? Is your battery fully charged? Even so I wouldn’t think it should slow to the point where its unplayable.

I don’t think that’s the case because it only happens in one scene!
But it’s a good guess nonetheless, I’ll try it with the phone fully charged to see if anything changes.