- Home /
Using targetFrameRate forces Main Thread HIGHER?
This is just a general question that has been bugging me.
I'm currently developing an app the user sometimes doesn't have to babysit, so I lower the frame rate to reduce the battery consumption.
The only thing is that in my stats, when I bring the frame rate down (in this case to 5fps), the main thread goes from ~24ms to ~180ms.
Am I wrong to think that a higher main thread value in the unity editor constitutes a higher usage of power? I want to be as optimized as possible, but I don't want to live in a delusion where the lowest Application.targetFrameRate value I can use is more important than paying attention to the main thread.
In xCode, the stats show a significantly lower usage of battery power and CPU usage, when I have the fps lower. What's the deal with the main thread, and where I read more on it? If you're going to supply links, please don't post them unless they share an answer to my question, as it would otherwise circumvent knowledgeable, satisfying responses thereafter.
edit: I'm not syncing any fps. I'm managing it during runtime, so that I can control the min & max frames.
http://forum.unity3d.com/threads/application-targetframerate-not-working.169299/#post-1157567
Those stats from the editor are meaningless. You need to test it on a real device. Also, make sure to turn off vsyncing otherwise your targetFrameRate will be ignored anyway.
If I understood it corectly your game will continue processing even when the player quits and do something other with there Phone? How do you want to keep your gamethread alive, while in background??
1 sec. = 1000 ms 1000ms / 180ms = 5fps Your main thread excution time went up to get your 5fps. But dont worry either your main thread executes slower or pause the additional ms(I'm not excactly sure), but it will save battery.
Your answer
![](https://koobas.hobune.stream/wayback/20220611233941im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Sprites performance issue 0 Answers
GameObject.FindGameObjectsWithTag - How CPU Intensive is it (iOS)? 1 Answer
How to improve FPS on mobile? 1 Answer
Do you have to lock when you have high fps? 1 Answer
Performance Spikes in Unity in Profiler 0 Answers