PSA: Fixing Power Consumption and Stutters of Facebook App - Android General

No doubt Facebook's official Android app is a mess. It lags and stutters frequently specially when scrolling News feed.
That's because Facebook automatically starts playing videos in news feed. The CPU has is already engaged parsing the feed and decoding images to be displayed & the app starts playing videos at the same time (depending on your network conditions).
Not that you may not be facing this issue because the lag depends on several factors like
If other processes are consuming your CPU in background
How the governor handles scaling of the CPU
How the load is distributed on multiple cores
How aware is the governor about the current workload on system level (EAS is the only governor that I know of that closely comunicates with sytem level APIs to get most correct information about workload on the system)
Fix The Stutter:
To fix the stutter in scrolling and make the app consume less power
Open Facebook
Slide towards your profile homepage on the right
Scroll Down to "App Settings"
Tap on it
Tap on AutoPlay Videos
Turn it Off

Related

[Explained] Project Butter

What's Project butter?​
Google’s Project Butter addresses speed to make the user experience “buttery smooth” in three distinct areas. Project Butter applies to the entire OS, not just the launcher, so this smoothness should be immediately available in every app running on Jelly Bean.
Vsync
Vsync improves graphical performance and increases the frame rate to 60fps! To ensure a consistent frame rate across the entire experience, Android 4.1 extends vsync timing across all drawing and animation that the Android framework handles. Everything is coordinated to a 16 millisecond vsync “heartbeat” — application rendering, touch events, screen composition, and display refresh. So frames don’t get ahead or behind.
Triple Buffering
There are three major components involved in showing something on the screen: the CPU, GPU, and the display itself. Triple Buffering allows the CPU, GPU, and display to work together for much smoother animation. Triple Buffering brings more consistent rendering that makes everything feel smoother, from scrolling to paging and animations.
Touch Responsiveness
Touch Responsiveness “anticipates” or predicts where you’re likely to put your finger on the screen, and gets ready for that tap, making whatever action is behind it that much faster to load.
Jelly Bean reduces touch latency by synchronizing touch to vsync timing (which we mentioned above). By anticipating where your finger will be at the time of the screen refresh, Android 4.1 is more reactive and and presents a more uniform touch response. Also, after periods of inactivity when Android has dropped the CPU speed to extend your battery life, the OS will apply a CPU “input boost” at the next touch event, to make sure the CPU is ramped up to speed so there’s no latency.

[Feature Request] Benchmarking

Once upon a time there was TCPMP (CorePlayer) for WM. It had one interesting feature - benchmarking. This options forces player to play video as fast as possible and measures FPS (until you hit stop or video ends).
Such feature is really useful for testing overall perfomance and perfomance hit/gain of different options (how much "speed-up tricks" help, how much subtitle rendering consumes, new decoder optimisations, etc.).
Interesting thought. Though, you could always use something like Antutu, or get an FPS meter app?
CDB-Man said:
Interesting thought. Though, you could always use something like Antutu, or get an FPS meter app?
Click to expand...
Click to collapse
It's a bit different - it measures real playback perfomance, not some abstract number. Even if it was measuring pure cpu perfomance - different archictures have different efficiency at video decoding (think about extentions like MMX/SSE/AVX on x86), plus decoder gets better over time (you get more fps for same cpu perfomance).
Is 40k in antutu enough to play 720p hi10p flawlessy? "It depends".
Fpsmeter will (at best) show only frame drops - when player was not fast enough to draw a frame. If you play 30 fps video and it will say that it plays at 20 fps - it doesn't mean that you can play similar video at 20 fps or that you need to get 50% faster. And if it plays without frame drops - you'll never know how much extra perfomance you have.
But that way it would be possible to do such things:
1) Run video and say:
- "hey, it runs at >120%, I don't need to touch anything to be happy".
- "it runs at 100%, which means that it barely could play it - I need to do something".
- "it runs at <80%, nothing will help so it's better to give up".
2) Change settings and say:
- "switching to yuv/rgb32/rgb16 made it 10% faster, so I should probably use it if I'm happy with quality"
- "I needed some extra perfomance and speed-up tricks got me extra 30% - just what I needed"
3) Give video and ask to benchmark it and then judge how capable the device it (I've seen people that say "flawlessly"/"watchable"/"playable" at 15 fps).
For example I've wasted hours testing hi10p perfomance on my Z3c - sometimes it plays flawlessely, sometimes overheats (drops cpu freq), sometimes lags... and there're different setting to play with, let alone videos with different complexity (and subtiles).
Mx is a media player not a benchmarking tool. I think this feature will only hog unnecessary space for thousands of people.
I partially agree with the OP.
Benchmarking would help with identifying how fast the decoding/rendering is on a certain device.
However, I think there's more value doing this for the ffmpeg team

Scrolling in Google Play Music & Play Store needs to be fixed

Perhaps I am part of a very small minority in this regard but has anybody else noticed how poorly implemented scrolling is in the Google Play Music and Play Store applications? Here is a short video highlighting the problem.
What's happening here in both applications is that images are being loaded into RAM as they move into view, unloaded when they move out of view and then reloaded when they move back into view. This might seem insignificant but it impacts the user experience in two very negative ways.
The first is that while you are scrolling through the list of album artwork in Play Music or applications in the Play Store, you will encounter numerous little stutters as new images come into view and are loaded. Given that almost every other facet of Android 5.0 is running at a consistent 60 FPS, this is very jarring and unpleasant.
The second impact which this produces is that (especially in Play Music), you are forced to stop and wait for the album artwork to catch up with you while scrolling. This is highly inconvenient as one of the main purposes which album artwork serves is to allow you to quickly identify an album at a glance. It should not be necessary to crawl through the grid listing in order to easily distinguish one album from another.
Now with all of that said, I do understand why Google chose this particular scrolling implementation. The idea was to improve performance on lower end devices with less RAM and slower SoCs. On a low-end device with very little RAM and a slow SoC, caching a large number of images simultaneously would be quite taxing. This would have been a reasonable compromise to make three years ago but at this point you would be hard pressed to find a low-end device with less than 1GB of RAM and almost every flagship Android device currently ships with 3GB. In this case, Google's attempt to improve performance has actually had the opposite effect.
The HTC Music application on my HTC One M7 last year (which had 2GB of RAM) cached all of the album art immediately upon launching, which resulted in a perfectly smooth experience. There is nothing preventing Google from doing this. If necessary, they could even design these applications to check the amount of RAM available and change their behaviour accordingly.
For comparison, here is another short video demonstrating what a good scrolling implementation looks like.
In this recording, I scroll through about 250 cached images, occupying only about 6MB of RAM.
The points where it appears to get stuck are simply due to the poor touchscreen driver in this build of Lollipop and can be ignored.
Another issue with Play Music which has been bothering me is the size of the album list grid. Only being able to fit four albums onscreen at once is incredibly silly and there is no way to change it. What was Google thinking when they completely removed the standard list view?
Anywhoozles, I congratulate you on your perseverance for making it through this mini-essay. :highfive:

[GUIDE] How to Really improve the gaming framerates on your Mi A1

Yo fellas, its your"rooting enthusiast SenpaiYank (lmao rooting enthusiast, as if such a thing exists)​
Well, as you know, our device has a quite outdated and not so beefy (at all) SoC, the snapdragon 625. While its CPU is not tremendously ridiculously bad, the GPU quite is. This is not a prolem to people who don't care about games but a very prominent one on the other side.
With the help of this trick, tweak, whatever you decide to call it, you'll practically be able to play any game out there that you're not able to or play that same game at a higher setting than you would. The trick consists basically on lowering the screen resolution through a script, trading some of the visual quality for a noticeable night day performance boost. It's a common trick that works on other devices too and I've yet to find a game that had problems with it.
I'm using "profile" scripts to achieve it so you can change it on the go. I feel that way is the most ergonomic and quick one. Just run each script with root permissions according to your need. I recommend FX file explorer. Wanna play a graphically intensive game? Switch to gaming profile. Wanna do something else besides gaming? Switch to the default one.
As I side note, the trick can be done on unrooted users too but you'll need a computer and you'll have to apply the gaming profile permanently (unless you're willing to repeat the procedure whenever you want to go back to default). I can talk about it if you guys get interested on it.
Enough blah blah, how do I do it ?​1st - Grab both of them (default.sh and gaming.sh)
2nd - Install (in case you don't have it), open and type this on the Terminal Emulator app:
Code:
su
To attain root access (not sure if needed but, just in case)
Code:
wm density
To get your current screen density value at 1080p (override density field).
Lets imagine you got 432.
3rd - Choose and calculate a new resolution for your gaming profile
So now lets ge to the actual work. Our device native resolution is 1080p (1920x1080) and we want to lower that.
I lower it to 810p (not a standard lmao) which is 75% of 1080p (1440x810) as it gives me agood balance between visual quality and performance. You can go even lower to something like 50% if you're ambituous about performance. At 810p I can expect a minimum of 25% performance uplift (not FPS).
So, to get your gaming profile resolution DPI, you multiply the relative percentage of it by the default profile resolution DPI.
Code:
[COLOR="darkred"]432[/COLOR] * [COLOR="RoyalBlue"]0.75[/COLOR] = [COLOR="Blue"]324[/COLOR]
This value will be your gaming resolution DPI a.k.a. the resolution from your gaming mode script.
4th - Edit default.sh and gaming.sh, apply the new values and save the files somewhere.
default.sh script should contain the values of your default resolution, in this case, 1920x1080 and 432. Size for resolution and density for DPI.
gaming.sh script should contain the values of your gaming profile resolution, in this case, 1440x810 and 324.
VOILÁ​
To make the process much much easier and quicker, I use FX file explorer and its shortcut feature so I can switch between both profiles from my home screen pretty easily. Whenever I'm not playing a demanding game Is stick to the default mode, whenever I'm playing a graphically intensive game, I switch to the gaming mode and enjoy the improvement.
Cool, cool. So, is there an actual improvement in performance or is this just one of these so called placebo tricks ?​It's definately not placebo and probably the most effective way around of increasing gaming performance!
I've tried to record a test with and without the trick (and failed, it doesn't look as effective in the video but I'll leave it here anyway). Take it with not 2 but 3 grains of salt due to all the uncontrallable factors that involved the scene, the actual gain in practical use is much more noticeable. The benchmark takes place in the super duper hot (pun intended) looking and intensive game, Shadowgun Legends.
On the first video, the device is running the Extreme Kernel, without the tweak, along a CPU cap of 2.5Ghz and a GPU cap of 855Mhz (or something around that). I didn't increase it further to prevent the device from overheating (which it already practically was) and because at a higher GPU clock, I would get arctifacts (my device does not support the 922Mhz frequency).
http://sendvid.com/zi9l8q44
On the second video, the device is running a beta batch of the velocity kernel, with the tweak, along a CPU cap of 1.9Ghz and GPU cap of 672Mhz. I ran the device at a lower speed so you can see how useful the improvement can also be.
http://sendvid.com/fqum12jw
I ran the game at the high graphical setting (30 FPS max) on one of its most intesive scenarios and were at very high ambient temperatures (30C) so again, take the videos with a grain of salt. Used an external gamepad to play and used Scrcpy to record the screen (through wifi so, the quality and framerate from the recording is considerably worse than the actual one). You should also remember the 5-6 FPS strain of capturing the screen.
I also used game bench to monitor the framerate (top right corner) where the last 1 minute of each benchmark were with the screen capturing off. Once again, sorry for the bad quality of the recordings, I'll leave a screenshot of the game bench results.
Not willing to write a outro so, yeah, basically thats it
Here's another sample video, of the same game, this time at medium settings. Along the very noticeable smoother gameplay you can also notice how the GPU load goes down from 95-100 to 70-80 and it becomes less of the bottleneck on the scenario. With the gaming profile could I could actually remove the 30 fps cap and run the game at +30.
Before:
https://photos.app.goo.gl/hwPg9KCwc6yLyt919
After:
https://photos.app.goo.gl/zDm4wkTHuAjQ7PA5A

120hz not stable

my phone sometime 60hz but my settings 120hz
Some applications will not flow smoothly.
Hi
I have the same feeling : Mario Kart looks like smoother in 60 hz rather then 120hz. It's just a feeling, I have no proof about it.
its not just the apps
they use dynamic refresh rate and it means the refresh rate changes in order to save battery
I notice lags even when I do basic things like opening the recent apps menu or opening some apps, this **** is so annoying....

Categories

Resources