On 02/16/2014 07:22 AM, Prateek Jadhwani wrote:
I have been working on Gaia's Lazy Loader part for quite some time.
And here are my findings.

http://prateekjadhwani.com/wp/?p=751

Please let me know, what do you guys think about it. Let me know if I
am wrong somewhere, or the article needs improvement. Or any
remarks.

Note: I'm not on the performance team, so take what I say with a grain of salt, although I'm pretty sure my beliefs are correct in this case.

That said, this part is wrong, as far as I know:

"These series of appends of resources are never ever removed from the HTML files after their use. Instead, they stay there, hogging resources, until and unless the cell phone is restarted."

First, it's pretty easy to close apps if you care to (hold the Home button). Second, if a foreground app actually needs more memory than is available, Firefox OS will just kill background apps that haven't been used in a while until there's enough free memory. (It's called the "OOM killer"; I imagine there are some documents about it somewhere if you search.)

"Even when we close the app, the objects that were referenced gets garbage collected, but there is no way to get rid of the loaded files from the memory."

I'm not sure what this means. Are you trying to imply that the source code for the apps isn't unloaded from RAM after closing the app? I'm pretty sure it is, since apps are loaded in their own processes and the process is terminated when you close the app, thus automatically freeing up the memory.

If you have an actual citation proving otherwise, I would be extremely interested to see it. Even so, fixing the lazy loader is unlikely to be the solution, since we should be fixing this at the Gecko level to prevent web content from causing the same issue.

Overall, I find it suspect that you didn't post any numerical data to back up your assertions. If these issues *do* exist, it should be possible to measure them. There's not much sense in trying to optimize the LazyLoader unless we have hard evidence that it's a performance bottleneck for us; otherwise, we're wasting effort that could be put to better use elsewhere.

- Jim
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to