Flash 8 garbage collector benchmark

Crée le : Dimanche 25 Septembre 2005
Dernière révision : vendredi 30 septembre 2005 11:47:50

Goals and usage

The main goal of this benchmark is to demonstrate how the new GC behaves when we fill an array with many new instances of an object and we destroy the array.

The test have been made on a computer running Windows 2000 SP4 with 1GB of dual-channel RAM and an AMD 3000+ processor.

Download the .fla file of the benchmark

Attention :
This benchmark use a lot of CPU and memory, do not run this test if you do not know exactly what you are doing or if you do not understand all the code inside the benchmark file.

Results

Résultats du banc d'essai mettant à l'épreuve le Garbage Collector du lecteur Flash 8

After observation of the results of the test, we can see that the garbage collector of the Flash player 8 (tested with version WIN 8,0,22,0) works differently from the Flash player 7 one (tested with version WIN 7,0,19,0) as Tinic Uro has announced on its blog in the post which motivate me to make this test. Note that it works the same whatever the version of the SWF is.

Before giving hasty conclusions, it is necessary to keep in mind that this test this test makes an extreme use of the computations used in an ordinary application, it consumes 627MB of memory, it is 10 to 20 times more than one ordinary Flash application, the variations observed by the management of the garbage collector on the CPU must probably be minimized as much as 10 to 20 times to be near from the reality.

In first, it will be observed that during the filling of the huge array, the Flash player 8 consumes less memory than Flash 7 player does (FP8 435MB / FP7 627MB) . This change is probably due to the new garbage collector since the operation does not use any other parameter related to the management of memory consumption in the calls to the method used to fill the array.

On the other hand, when the array is full and that the application works in background task (3rd stage), it is really strange that the new GC tries unceasingly to flush the memory by using as much CPU.

Surprisingly we can observe (4th stage) that new the garbage collector fails to flush the memory after destruction of the array whereas the Flash 7 player does it even if it uses 100% of the CPU during the process and permits to the memory to return to the initial level of memory consumed by the application on its opening.

  wordpress rss rss français rss english xhtml 1.1 css 2.0 wdg