WPF performance and .NET Framework Client Profile related blogs provided by Jossef Goldberg.
As you know the .NET Framework 3.5 Service Pack 1 Beta download is now available. There are many improvements in this release that we are very excited about. Scott Guthrie blogged about these improvements here and so did Tim Sneath. In this blog I want to specifically focus and provide more details on the performance improvements coming in WPF.
Significantly improved BitmapEffects performance
New Effect Extensibility
Improved DirectX Integration
Improvements to WriteableBitmap
Improved Text Performance
Improved Z-index Scenarios
Remoting
Although we have not improved this scenario, it is important to highlight some differences related to Remoting On .Net Framework 3.0 and .Net Framework 3.5:
Vista to Vista with DWM on, we Remoted content as Primitives (e.g. the channel protocol went over the network) (This is for the Remote Desktop case only, not Terminal Server) In other cases: we Remoted content as Bitmaps On .Net Framework 3.5 SP1 We now remote as bitmaps in ALL cases. The reason is that WPF 3.5 SP1 now uses a new graphics DLL (wpfgfx.dll) and certain changes could not be made to Vista’s existing graphics DLL (milcore.dll) that is also used by DWM. Although this could be seen a regression at first, depending on the complexity of the application scene (e.g. very rich scenes) this can actually improve performance in certain scenarios . Also, connections with reasonably high bandwidth and scenarios that don’t involve a lot of animation or 3D, for instance, tend to remote just fine via bitmaps.
On .Net Framework 3.5 SP1
New “Nearest Neighbor” BitmapScaling Mode
Minor improvement to Tier APIs
Smoother animations
Layered Windows improvements
I have blogged about the availability of QFEs for Vista and XP before. These fixes now included in the recently released Windows XP Service Pack 3 and in Vista Service Pack 1 Note that there is a difference fix on each platform. On XP: Huge improvements as now render in HW vs. SW before On Vista: Smaller but still significant improvement to readback from GPU
Improved scrolling performance (by introducing Container Recycling support)
Added virtualization support to TreeView control
Deferred Scrolling
Better fundamentals for DataGrid control Various enhancements were made to enable developers to write a faster and better DataGrid:
Various enhancements were made to improve WPF application startup time a) Improved Coldstart time By optimizing how we layout the code blocks within CLR and WPF NGEN images we improved the disk IO access patterns we are measuring up to 40% faster coldstart time on average. (we define 'coldstart' for the first WPF app you launch after system re-boot) These gains are depending on the scenario and the application size. Larger apps likely to see better gains than small apps.
Various enhancements were made to improve WPF application startup time a) Improved Coldstart time
b) Improved coldstart for strong-name signed assemblies not GAC’d. In certain deployment scenarios, an app author may choose to strong-name sign their application assemblies but not to GAC the assemblies because it requires admin privileges. In this scenario, the entire assembly had to be read off the disk so the CLR can do the hash verification. This had a significant coldstart hit. In .Net 3.5 SP1 the CLR bypassed this hash verification by default, which means that the app have less disk seeks and disk read and therefore startup time is improved. (As indicated in this blog the majority of coldstart time is spent on disk access.) The expected startup gains depends on the assemblies size and on what else the app is doing in its startup, but in one scenario we measured ~5% coldstart gains in addition to the gains measured in (a). If you want to disable this default, an app author can provide a config file (e.g. YourApp.exe.config) and add this: <configuration> <runtime> <bypassTrustedAppStrongNames enabled=”0” /> </runtime> </configuration> You can find more details in this blog.
c) XBAP coldstart improvements By improving the concurrency of the ClickOnce download sequence we are now seeing up to 10% startup gains for XBAPs scenarios in addition to the gains measured in (a). Up until 3.5 SP1, the XBAP progress UX was rendered using WPF, which means we had to coldstart the CLR and WPF. Starting with .Net 3.5 SP1, we now render the progress UX using HTML which will be shown almost instantly and will improve the perceived startup performance.
c) XBAP coldstart improvements
d) Splash Screen to improve perceived startup Although coldstart time is improved, it is still not instant. In .Net 3.5 SP1 we are adding new public Splash Screen APIs to allow developers to easily add Splash Screen and make their application startup experience more responsive. Some simple customization is possible with these APIs. An intuitive integration with Visual Studio 2008 SP1 to make this experience even easier is coming in RTM. Note: these APIs will only be available in the RTM bits
d) Splash Screen to improve perceived startup
Important note: Although we made some impressive improvements to WPF application startup, don’t expect it to be as fast as Win32 application or Winform. WPF simply load more code off the disk. We still expect application developers to properly optimize their app for faster startup and follow the recommendations provided in this blog.
Memory footprint
Improvements to NGEN / JIT
Awesome! Thank you very much for the detailed list. Great work!
Visual Studio *3008*? My, how time flies... :-)
Here are some pretty comprehensive resources on the new features in our WPF SP1 release. Scott Guthrie's
"On .Net Framework 3.5 SP1
We now remote as bitmaps in ALL cases." - this is pretty disappointing,I hope in RTM you will find some workaround for this. I really liked how WPF remoting was peformed so far, and I dreamed that one day most of applications would be remoted with a high perfomance using WPF features. This looks like a step back in desktop remoting technologies.
You probably already saw Soma’s Blog on the Beta for Visual Studio 2008 and .NET FX 3.5 SP1 . If you
I know I am a little late on blogging about .NET 3.5 SP1, but here goes... This is a huge release...
The third major update of WPF has just been released as a Beta, as part of the .Net Framework 3.5 Service
I recently got a question on how to implement IEditableCollectionView with GridViewColumns that are dynamically
Le Service Pack 1 de Visual Studio 2008 est actuellement en beta et en anglais. Il sera disponible prochainement
All of these updates and no solution to the font rendering problem in WPF? The quality of the cleartype in WPF is beyond poor. You can add all the features in the world, but until you fix this issue, WPF is not a solution for data driven apps that make use of "normal" sized text. Who cares about device independent pixels when you can't even make a program that is caparable to a WinForms app in terms of readability. People are forced to use WinForms or take the long route with Asp.Net for web applications. So frustrating that you guys just don't get it.
To VirtualLNK:
Thank you so much for the feedback.
We are aware that we need to improve the quality of our text. We are working really hard on it on it and hope to provide improvements in the near future.
Jossef
As has just been announced on several MSDN and product teams blogs , Service Pack 1 for .NET Framework
We just announced the release of Service Pack 1 for VS 2008 and .NET FX 3.5 . A major push for this release
.NET 3.5 SP1 buzz peaked very early at the beta.  At the time I was immersed in Silverlight, so