What’s New in Silverlight 5? – Performance and Other Improvements

What’s New in Silverlight 5?

شاهد كورس كامل سيلفرلايت 5 مجانا هنا.

This content is based on Beta release, expect many changes in the final release.

Read What’s New in Silverlight 5 series here.

 

 

Introduction

In this article, we’ll have a brief discussion of the performance, networking, and other improvements in Silverlight 5.

 

Performance

Performance has been improved in Silverlight 5 in a number of ways:

  • Significant improvement in performance through the entire product
  • Startup performance has been improved using a multi-core background JIT compiler
  • XAML parsing time has been improved especially for UserControl and ResourceDictionary
  • Added 64-bit runtime version. Not in beta
  • Hardware accelerated rendering in Internet Explorer 9 in windowless mode

 

Networking

And networking has its share of improvements:

  • Network latency has been improved significantly
  • 90% performance improvements in ClientHttpWebRequest scenarios

 

Services

Added support for WS-Trust in WCF. (WS-Trust is a specification aimed to improve security and validation.)

 

Profiling and Testing

  • Automated UI testing
  • Improved profiling support:
    • Memory
    • CPU
    • Thread contention

 

Other

  • Support for Windows Azure
  • In-Browser HTML support
  • Many more fixes and improvements throughout the product

 

Now, check out other What’s New in Silverlight 5? articles.

What’s New in Silverlight 5?

Silverlight 5

شاهد كورس كامل سيلفرلايت 5 مجانا هنا.

This content is based on Beta release, expect many changes in the final release.

Check out other Silverlight 5 articles here.

If you are new to Silverlight, check out this article.

What’s New – XAML Changes
What’s New – Control and Text Changes
What’s New – Graphics Changes
What’s New – Media Improvements
What’s New – Elevated-Trust Changes
What’s New – Other Improvements

Download Sourcecode

 

Silverlight 5

The first thing to know about Silverlight 5 is that it’s currently in beta, means that it definitely has bugs, and it also not yet feature-complete; some features are going to be shipped later in the final version. In addition, being in beta means that no go-live license available, this is for internal use and testing only so do not install on user’s machine.

Worth mentioning that Silverlight 5 was first announced at PDC 2010 conference (October 2010) and the beta version was shipped later at MIX11 (April 2011,) and the final version will be released soon this year.

 

Goal

Goals of the version 5 include:

  • Improving performance
  • Getting closer to WPF
  • Enabling line-of-business scenarios
  • Better development experience

 

Improvements

Silverlight 5 has come with lots of improvements and changes, and those improvements can be divided into several areas:

 

Getting Started

To get started you need to have first Microsoft Visual Studio 2010 Service Pack 1 installed on you PC. After that, you can go to http://silverlight.net and download the beta SDK and tools for VS2010.

In addition, you can install Microsoft Expression Blend Preview for Silverlight 5 Beta if you like using it.

After you have VS2010 SP1 and Silverlight 5 SDK installed on your PC, you can continue reading and start making your cool stuff!

Now let’s start with XAML changes, but first let’s take a look at our model that’s going to be used through all the samples.

 

What’s next?

Start with…

Manually performing a garbage collection!

I was asked whether it’s efficient to perform a manual garbage collection using GC.Collect() or not!

Actually, it’s better to just let the CLR handle it. However, there’re few circumstances where manually performing garbage collection is preferred, such as if some non-recurring event has just happened and this event is highly likely to have caused a lot of old objects to die.

More details are available in Rico Mariani’s…

Have a nice weekend!

Does cleaning Prefetch offers more performance?

هذه المقالة متوفرة أيضا باللغة العربية، اقرأها هنا.

It has been always said that when you clean the folder %windir%Prefetch you give your system and applications more performance.

Actually, thats one of the fables around Windows. Each time you start your computer and each time you open a program that you commonly use, Windows keeps track of information required to start the computer or that application and saves theses information in small files (called Prefetch entries) in the Prefetch folder to use it later to help speed up the computer start process or the application start time.

Thus, cleaning the Prefetch folder doesnt improve performance at all. Instead, it slows it down. It makes Windows uses longer time to start, and makes your favorite programs take longer time opening. An analysis did by TuneUp Systems results in a noticeable slowdown during Windows boot-up time and all applications that are commonly used took significantly longer to start after cleaning Prefetch.

Obviously, you do not need to deal with Prefetch entries manually, Windows handles them all. Actually, Windows Vista (and future systems that support UAC) helps protecting the Prefetch folder by using UAC (User Access Control, read more here) to prevent unauthorized access to this folder.