On Sunday, December 22, 2013 10:23:06 AM UTC-5, Ben Kelly wrote:
> 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

Hi Ben,

Thanks for replying. Currently I am not seeing any symptoms. While I was going 
through the code, I just couldnt find the code to remove scripts. Thats it. I 
havent seen any LazyLoader code that removes the script explicitly. If it could 
be done, then I think, it might help the devices a lil bit. 

I still dont know how opening / starting of apps work. If it is something like 
adding the whole folder to the memory , then start accessing it, then its a 
different scenario. But if we are calling just the required files then adding a 
code to remove the scripts would be great.


Thanks once again.
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to