August 21, 2013 07:53 by
Scott
Silverlight boasts several performance enhancements that will improve its speed and scale within the enterprise. The first is the ability to run animations on the composition thread instead of the UI thread.
The UI thread is a dedicated thread that handles input and output for the user interface. It is where much of the rendering computations and actions take place as well as polling for mouse movements and keyboard input. Heavy computations on the UI thread will cause other operations to become blocked and the application to become unresponsive.
The composition thread is a separate thread that was introduced to provide rendering for 3D graphics in Silverlight 5. It can also be used to run animations. This is important because animations usually run on the UI thread. Not only do they take resources from other processes competing for this thread, but also can degrade when there is massive work performed on the thread. By moving certain animations to the composition thread, they can run independently and remain fluid despite processing on the UI thread. Animations are run on this thread when the UI element that is targeted has the cache mode set to BitmapCache and GPU acceleration is enabled for the Silverlight application.
A second enhancement is the provision of a multi-core Just-in Time compile (JIT). This means the Silverlight runtime can generate code more quickly and provide a faster response time on multi-core machines. Additional optimizations of the networking stack have led to reduced network latency, which means better responsiveness when connecting to remote systems. Add to that speed improvements that were made to the XAML parser and you end up with a well performing system that should run faster on the same hardware as compared to its predecessor. According to Microsoft, improvements to the networking thread alone reduce latency by up to 90 percent.