[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] -+BB+-:
Don't worry :) Talking about Gemini if you are interested on work on it and It's your first time on Android this is probably not the best device, there are a lot of things that must be adapted and require a lot of work, especially on kernel side, but if you still decide to give it a try I can say that's this is with my beloved Galaxy S4 the funniest device I've found for Android development :)

That's because every new version of Android require more RAM/CPU than the previous one, Google use several custom/additional services, because they ship and officially support devices with a lot on RAM and modern CPUs. Random animation lags happen mostly when waking up the device after a long time of deep sleep, a lot of services/misc stuffs starts running in background, if LMKD starts killing old tasks (LMKD runs at a really high priority) or another CPU intensive operation starts in that moment (and will probably happen after a long time of sleep) we simply don't have enough CPU power to handle everything. And worst thing, some process that sometimes LMKD kills are required by some ROM feature, and userspace will restart them immediately after LMKD kills them. This introduces unuseful CPU and read/write operations, increase battery usage and may cause slowdowns/lags (4Gb devices should be safe from this madness)

RAM amount is another big issue too, unfortunately there's nothing to fix, on 3Gb devices the number of apps that can run in background is really low. We have more or less 750 Mb of free RAM when PE is running, LMKD starts killing task when we have only 350 Mb free (at that point usually ZRAM have 400 Mb free more or less), this means 400 Mb of RAM available for apps. With LOS 20 the available RAM after the boot is 1150 Mb, we have 800 Mb free for apps.

About video I don't use Instagram but I have no problem at all with my latest build and HD videos, tried with VLC, Plex, Youtube and from Chrome/LOS browser, I can play 30+ min of 1080/60 fps videos without lags or freezes.

If you want to give it a try here's two builds, PE plus and LOS 20, both compiled with the same exact kernel/dt sources, I wanted to compare perf with my latest changes and the result in terms of battery life, smoothness, overall speed and apps running in background are (to be gentle) embarrassing... Well, after all we are running an OS designed for high end devices in a 7 years old legacy device, this result is expected, especially on 3Gb variants

Both builds include all the changes that I will release when PE guys will update their sources to QPR3 + July security patches (LOS is already on QPR3)

Lineage 20

PE link removed, download latest public build

There are several improvements from latest internal build I shared, most important are ZRAM deduplication, ZSTD speed improvements (about 2X), a lot of misc fixes and small improvements on kernel side for perf and power consumption + all security patches (see my repo for detailed info) and debugfs restrictions enabled on dt

LOS 20 also include an additional fix (I had no time to include it in PE build, but will be included in next release) needed by GCAM when is installed as user app and from other camera apps (Snapchat for sure wants to read them) with SELinux in enforcing mode: SEPolicy: allow appdomain to read camera_prop. With this commit and GApps installed GCAM works as expected on LOS 20 (tested the same Shamim version we are using on PE with mandayugana config file and it's working pretty fine)

NOTE: LOS 20 has been signed with my signing key this time, can be used as daily without security issues (I've uploaded the new LOS recovery too, signed with the same key)

NOTE 2: update to this build if you are running my previous internal build, I reverted a commit that was causing a ton of warns and it' s related to video sessions: Revert "msm: vidc: disable CPU L2 cache PC during video sessions"

EDIT: added the stats with LOS after a day of usage

EDIT 2: I've uploaded the latest kernel for LOS, fixed a couple of remaining things and other small perf improvements. Battery stats will be probably screwed after the flash, will start to work again as expected when device is charged at 100% and stats gets reset