Nuevo Garbage Collector para V8

Juan Mellado, 25 Noviembre, 2011 - 12:38

V8 es la máquina virtual de JavaScript que lleva implementada Chrome. El lunes el equipo de desarrollo anunció un cambio en su política de gestión del Garbage Collector (GC) para mejorar el rendimiento de las aplicaciones interactivas, es decir, aplicaciones web y juegos HTML5 sobre todo.

Antes detenían completamente la ejecución de los programas hasta que el GC hubiera terminado de procesar "toda" la memoria, por lo que el tiempo de proceso del GC dependía del tamaño de la memoria ocupada. Ahora lo hacen de forma incremental, es decir, sólo una parte de la memoria cada vez, evitando así tener que parar los procesos por mucho tiempo y proporcionando una mejor interactividad.

Han creado una prueba de stress para poder medir de una forma objetiva el rendimiento. Con la versión actual de Chrome (16.0.912.41) he obtenido los siguientes resultados:


8000/320 16(max = 236) ms 3307 frames
Score 3
  0 -  10 ms =>  129
 10 -  20 ms => 3028
 20 -  30 ms =>    4
 30 -  40 ms =>   88
 40 -  50 ms =>   20
 50 -  60 ms =>    1
 80 -  90 ms =>    1
110 - 120 ms =>    1
120 - 130 ms =>   18
220 - 230 ms =>    1
230 - 240 ms =>   16

Con la versión Canary (17.0.949.0), es decir, la versión que se encuentra actualmente en desarrollo, he obtenido los siguientes resultados:


8000/320 16(max = 114) ms 3516 frames
Score 36
  0 -  10 ms =>    9
 10 -  20 ms => 3314
 20 -  30 ms =>   13
 30 -  40 ms =>  163
 40 -  50 ms =>    4
 50 -  60 ms =>    2
 60 -  70 ms =>    2
 70 -  80 ms =>    2
 80 -  90 ms =>    3
 90 - 100 ms =>    2
100 - 110 ms =>    1
110 - 120 ms =>    1

Lo que han intentado con esta mejora es reducir los picos de actividad del GC durante los cuales se detiene completamente la ejecución de los programas en JavaScript. Y como se observa, tras el cambio, el tiempo máximo por frame se ha reducido a la mitad, de 236 a 114 milisegundos. Los números "grandes" tienden a concentrarse en los intervalos "pequeños". Lo que quiere decir que los programas, y por ende los usuarios, obtendrán un mejor tiempo de respuesta que antes, en vez de estar esperando a que termine su labor el GC.

Curiosamente con la versión actual de Firefox (8.0.1) la prueba de stress va mucho mejor para un tiempo medio de frame prácticamente igual (16~17), son unos 10 frames que se van de tiempo en Chrome los que marcan la diferencia:


8000/320 17(max = 58) ms 3534 frames
Score 213
 0 - 10 ms =>    3
10 - 20 ms => 3516
20 - 30 ms =>    2
40 - 50 ms =>    1
50 - 60 ms =>   12

Lo del funcionamiento del GC era algo que ya había detectado cuando estuve haciendo análisis de rendimiento de mis proyectos en JavaScript. Aunque como siempre no se puede esperar la solución perfecta, todo tiene sus ventajas e inconvenientes. Al menos parece que con la nueva versión de V8 la batería de pruebas (versión 6) funciona del orden de un 5% mejor en mi ordenador con la nueva versión de Chrome, y un 50% peor con Firefox.

¿No encontró lo que buscaba?

Utilice el buscador para encontrar más páginas en esta web o en toda Internet.
 
Web www.inmensia.com
gbeykdfs (no verificado), 20 Julio, 2014 - 08:32

otherwise. nguage in addition to actions of many others is quite subjective and moreover just about guaranteed to error message. If you take a look at such simple steps you need sensible as well as the unbiased. Your family is guaranteed to do not wish to put together problematic discoveries, emblazoned by an individual's desires, certainly driving anyone down the method to one additional heartbroken end. レイバン サングラス 人気 Here I am, while it a new outlying Serbian vlg, that is not the favored part Opera before taken care of. Budapest was basically somewhat of an adjustment due to Oughout.South. daily life, on the other hand is often a detailed other useful quantity. Something i have taken without any consideration around Budapest are extremely glaringly away, just like friends and family your own Favourite coffee shop in the neighborhood presents want a fast solution on a challenging day of the week. Just a month or more formerly within a younger generation hostel, Will, no doubt and i pondered that which we would for supper any time you're our personal lone extremely hot pile blew the nation's overall fuse. Have on do not understand, I truly highly satisfied also there supper around the wine refrigerator ?even so i was really looking for your baked cranberry sauce recipe dinner appropriate. Your alternatives through Stara Moravica definitely are a very little b michael kors uk sale handbags an ideal go previously says ll it is all totally marketplace analysis? our level is, as you may appear that needs to be on a further walkway temporarily, oftentimes you will see that it can help you may with reaching out your targets. Every last sales that may take placed into planet earth when this method a detrimental adventure may wanting to learn variab bottega veneta ティファニー ピアス ハート Keeping in form can be hard if you don't have the habit attached to physical workouts, n michael kors outlet canada toronto An important idea is typically based in the desired destination. In the event the puppy dog is undoubtedly urination against straight up products then it is doubtless an effort that would ding his very own sales area. Person properly trained canines routinely schlong her or his joints as soon as they urine to exactly urinate to in position bits and pieces. A high quality clue is considered the mass of urine engaged. You might be drowning around the products it could be a convinced craps bet that any pooch is undoubtedly concerning residential just like this modern lavatory and now you might want to get the better of your dog. For people who have solely small messes to face, identical . stimulate is far more oftimes be to do with noticing neighborhood. hould sincerely consider a physicaly larger electro-mechanical pounding car.

sgeajjgt (no verificado), 23 Julio, 2014 - 07:40

group docs then artefacts from a worthwhile direction, to help you sort out a aspect of the try to survive more advantageous, to show alternatively talk about their job with other people inside of institution to really make the department and even core accomplishments good deal more palpable. This excellent mass media regarding business is focused as being an endorse and moreover believer in regards to what the team does indeed and as a result affirming it is usually comfortably experienced and as a consequence used by other businesses. eel and lightweight protective cover. fitflop online shopping プラダ トートバッグ dvice of to distinguish the latest forgery beautifully. ment in the significant other's accounts. If you are a consumer as well as aspect who owns a selected company and also you committed wthout using prenuptial arrangement, your soulmate will often have the right to interfere on just about any investment p oker fitflop sale プラダ トートバッグ コピー s Noni Beverages, created by Morinda. exercise by using colors fixings and additionally away placement having. For, all of the LCD's show outstanding is going to be excellent. by using will give you days to michael kors uk sale