debugging - What is Chrome doing with this "GC Event"? -
i'm getting following timeline simple site i'm working on. chrome tells me it's cleaning 10mb via gc don't know how be! insight appreciated.
i thought let expand image guess not - here's full size: http://i.imgur.com/fzjiglh.png
is site can check out or internal? i'd take peek. came across excerpt below while googling on google developers pages, memory analysis 101:
object sizes
memory can held object in 2 ways: directly object itself, , implicitly holding references other objects, , preventing them being automatically disposed garbage collector (gc short).
the size of memory held object called shallow size. typical javascript objects have memory reserved description , storing immediate values.
usually, arrays , strings can have significant shallow sizes. however, strings have main storage in renderer memory, exposing small wrapper object on javascript heap.
nevertheless, small object can hold large amount of memory indirectly, preventing other objects being disposed automatic garbage collection process. size of memory freed, when object deleted, , dependent objects made unreachable gc roots, called retained size.
the last bit seems potentially issue.
investigating memory issues
if you're inclined might want enable feature of chrome, chrome --enable-memory-info
, , take peak behind curtain see chrome potentially getting hung on.
once have chrome running memory profiling enabled you’ll have access 2 new properties:
window.performance.memory.totaljsheapsize; // used heap memory window.performance.memory.usedjsheapsize; // total heap memory
this feature covered in more details here.
Comments
Post a Comment