I think it'd make a lot of sense to make the app have high priority while it's launching, both CPU-wise and out-of-memory-wise.
If I recall correctly it's already Gaia's responsibility to indicate through the browser API which application is the foreground app. So if it could just make that indication immediately we should be able to wire up the Gecko bits so that the app process gets the right priority right away. / Jonas On Tue, Apr 1, 2014 at 5:20 AM, Thinker K.F. Li <[email protected]> wrote: > Recently, I found the timing of a new launched app becoming foreground, > and the existing foreground becoming background could impact our launch > time dramastically. > > We bind LMK parameters and priority to the fact of foreground or > background. A foreground app get more likely to survey while the apps > running out the memory. The problem is while an app is launched, it is > in background at beginning, and go to foreground later. It means the > existing foreground does not go to background immediately. So, for some > extreme condition, the device run out the memory and start to drop cache > pages, and the existing would still survey for a longer time. That > means the new launched app would running in less efficient condition for > cache dropping, and increase launch time. Especially for Tarako, > low-memory and with zRAM. > > If we could set the priority more correctly and with better timing, be > earlier than now, the existing foreground app would go to background > more earlier, it would get killed earlier too. > > I am not sure if making a just launched app as the foreground > immediately would break anything!? Or, we should lower the priority of > the existing foreground app temporary!? > > I need feedbacks. > > -- > Sinker > -- > 天教懶漫帶疏狂 > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
