On 12/22/2013 8:57 AM, Prateek Jadhwani wrote:
From the looks of the code, it seems that the js files LazyLoads the
code of the modules it needs. My question is does it get rid of the
js files that were LazyLoaded after its work is done, or does it stay
in the memory. Coz if it just keeps on adding every file, then it
might cause some serious performance problems. And I have no idea if
the garbage collection of the Gecko engine releases just the object
or the files associated as well.

Hi Prateek,

We mainly do lazy loading to help improve app startup time, though, and less to save on memory.

The lazy loader does not have any way to remove scripts later on (to my knowledge). Explicit unload would also be difficult given the Javascript VM semantics. I believe unreferenced code/objects should be freed correctly by the garbage collector, but I guess its possible code is treated specially.

Are you seeing particular symptoms of a problem here?

Thanks!

Ben
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to