In part one of the Flash Player Internals recap we covered how the player is built, for part two we talked about how the player infrastructure works. In part three, we will examine how ActionScript and the Virtual Machine (VM) are improving in Flash Player 10.1.
What's New, Player-cat?
First off, Lee announced that the ActionScript VM has been updated to use the newest version of nanojit, which is the same VM backend that is used by Firefox 3.5. This is an important update not only for performance, but because it supports many different processors. Processor support is critical when you are looking to run the VM on as many devices and platforms as possible and nanojit helps the Player team do this.
The Player now has a much improved internal String class. Strings have always been a bit of a bottle neck in Flash and the player team has updated the new class to allow better caching, faster string comparison, and most importantly lower memory usage. This kind of low level update is great because it improves how our applications run without having to change a line of code. Of course, you need to republish existing applications for 10.1 when it comes out (recall how the player versions SWFs), but the gains should be worth it.
On the memory front, the Player team has spent a lot of time focusing on how to use less of it more efficiently. The first step they took is to have the VM take up less of a memory footprint. Lee didn't get into any details but I would assume nanojit helped with this. The other area they looked at was Garbage Collection (GC) and how it could be tuned for mobile devices. What they have found is that memory usage has dropped anywhere from 10-50% for existing applications. The GC tuning wasn't the sole update for this huge improvement, we will look at some other updates in part four, but this was a big one.
read more...