WPF performance and .NET Framework Client Profile related blogs provided by Jossef Goldberg.
Hopefully folks saw my first “WPF 3.5 SP1 Performance on Tablet & Touch-enabled machines” blog.
In that blog I have mentioned that depending on the WPF application and scenario you may see significant performance issues and general sluggishness on Tablet & Touch-enabled machines and even on none-touch machines when UI Automation client apps are running (such as UI Spy, Narrator, Magnifier, etc).
This was especially noticeable during scrolling if the application comprise of many visual elements.
As I mentioned we have already fixed this issue in .NET 4.
I am now happy to announce that we just posted a Hotfix for .NET 3.5 SP1 that you can download from MSDN Code Galley site here and the Connect site here.
Enjoy. Jossef.
In .NET Framework 4 we have introduced a streamlined subset and more compact version of the .NET Framework called the Microsoft .NET Framework 4 Client Profile (aka NET4 Client Profile). The Microsoft .NET Framework 4 which is the Full Framework (aka NET4 Full) still exists and it is a superset of the Client Profile. Hopefully folks have seen Soma’s blog announcing the availability of Visual Studio 2010 , .NET Framework 4 and .NET Framework 4 Client Profile. I have discussed some of the beta features of Microsoft .NET Framework 4 Client Profile in details in my previous Beta 1 blog and Beta 2 blog posts. In this post I wanted to highlight some of the key changes from our previous Beta 2 public release and reiterate some of the important features
What are the reasons for a Client Profile? Although the NET4 Client Profile is smaller and faster to install compared to the NET4 Full Framework (NET4 is 7-8MB smaller in size than the Full Framework), the main reasons are not just better deployment size/time but also:
When to use NET4 Client Profile and when to use NET4 Full Framework? NET4 Client Profile: Always target NET4 Client Profile for all your client desktop applications (including Windows Forms and WPF apps).
NET4 Full framework: Target NET4 Full only if the features or assemblies that your app need are not included in the Client Profile. This includes:
How big is Client Profile? Below are the redistributable download size improvements since NET 3.5 SP1. As you can see we have made significant improvements. Note that if you are downloading from the Web, the actual download size could be smaller since some components may already be on your machine (for example, Software Rasterizer (rgb9rast) , etc )
3.5 SP1
4.0 RTM
32 bit Client Profile
Online: 28 MB Offline: 255MB
28.8 MB
32 + 64 bit Client Profile
N/A
41 MB
32 bit Full
35.3 MB
32 + 64 bit Full
48.1 MB
32 + ia64 bit Full
51.7 MB
32 + 64 + ia64 bit Full
231 MB
What is new in NET4 Client Profile RTM vs. Beta 2 ?
Since Beta 2 we made some small but important improvements to the he VS 2010 RTM UI: (You can read about the changes we in Beta2 in my Beta 2 blog ) A) Starting with VS 2010 RTM, the “Add Reference” indicates the target framework that assemblies are filtered against. B) The VS 2010 RTM toolbox now clearly indicates if 3rd party controls are not available for the selected profile.
Visual Studio 2008 introduced multi-targeting to allow application to target 2.0 and 3.x versions of the .NET Framework. VS 2010 has improved multi-targeting and starting in VS 2010 Beta2 many of the Client projects are targeting the NET4 Client Profile by default. I also discussed this in my Beta 2 blog .
These projects starting with VS 20101 Beta2 target the NET4 Client Profile by default: Windows Project (C# and VB) - WPF Application - WPF Browser Application - WPF Custom Control Library - WPF User Control Library - Windows Forms Application - Windows Forms Control Library - Console Application - Empty Project - Window Service
Visual F# - F# Application - F# Tutorial
Workflow (C# & VB) - Activity Designer Library - Activity Library - Workflow Console Application
WCF (C# & VB) - WCF Service Library
Office 2007 & 2010 templates (C# & VB) - All Projects
All other projects, including Class Library, target the Full Framework by default. Mixed-target scenarios using Class Library may present interesting challenges. Read more below.
To change targeting of your project, open the project properties, select the "Application" page, and change the “Target framework” drop-down. C# project example:
VB project example (Project Properties > Compile tab > “Advanced Compile Options…”):
Note that if you right-click the project and select “Add References”, the dialog shows only the .NET Framework assemblies that are part of the selected profile. This is accomplished by using reference assemblies (metadata-only versions of assemblies). The .NET Framework 4 Client Profile Reference Assemblies are located in: %programfiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client
At compile time, the reference assemblies are matched up against the known "Client List" assemblies that are included in the Client Profile. If a project targeting the Client Profile has a reference to a .NET assembly that is not included in the "Client List", Visual Studio displays compile-time errors in the Error List.
Some other VS 2010 projects such as Managed C++ (C++/CLI) still target the Full Framework by default. VS 2010 unfortunately does not provide UI to change the targeting. Fortunately, you can still edit the project file manually in order to change the profile targeting. To do so: a) Right click “Unload Project” b) Right-Click “Edit <project_name>” c) Set the appropriate project property to target Client Profile. e.g.
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile>
d) Right click “Reload Project”
In addition, for these projects, notice that VS does not create an <app.config> file for your project. Note: If your project does not add references or access assemblies that are included in the Full Framework but are not part of the Client Profile, there is nothing to worry about. Your app will run on machines with either NET4 Client Profile or Full Framework just fine. Otherwise, if you do access assemblies from the Full Framework, you should add <app.config> to indicate to CLR not to load your app if it is launched on the NET4 Client Profile. E.g. add this:
<?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> </configuration>
If you don’t do so, your app may crash at random when it needs to load the assemblies that are missing from the Client Profile.
The project Publish property page allows you to select the prerequisite needed for your ClickOnce deployment. VS 2010 automatically selects the correct profile (Client Profile or Full) depending on your primary project target.
The same prerequisite dialog from above appears when you create “Setup and Deployment” project (under “Add New Project”/“Other Project Types”). The NET4 Client Profile prerequisite entry is checked by default in this case.
If you create a new “Visual Studio Installer” setup project (under “Setup and Deployment“) and add the output of your NET4 Client Profile to it (Right-Click ->“Add”-> “Project Output…”’ select “Primary output”) , VS2010 adds a new “Launch Condition”. (Right-click on your new Setup project and then do “View->Launch Conditions”)
By default VS2010 will add NET4 Client Profile as a launch condition.
What this means is that once all prerequisites are installed and before the main installation launches, setup checks whether all the launch conditions are met. If not, setup blocks and displays an error message.
Testing NET4 Client Profile applications VS 2010 itself requires the NET 4 Full in order to run and it therefore install NET 4 Full. If your target NET4 Client Profile, it is highly recommended that you test your application on a separate machine that only includes NET4 Client Profile.
Common Questions & Issues with NET4 Client Profile 1. How can I select the .NET Profile in the “New Project” dialog? When you create new project in VS 2010, the “New Project” dialog does not indicate if the new project you are about to create is targeting Client Profile or Full. You can always go to the project Properties (see above) and change the target if you like.
2. I cannot find an assembly in “Add Reference” dialog The “Add Reference” .NET tab dialog only shows the .NET Framework assemblies that are part of the selected profile. So some assemblies, such as System.Web.dll are not included in NET4 Client Profile and will only show if you target the Full framework. If you must use System.Web.dll you need to retarget to the Full framework. Starting with VS 2010 RTM, the “Add Reference” indicates the target framework that assemblies are filtered against. 3. My project cannot compile when I reference a Class Library You may encounter mixed-target scenarios: for example, when your Client Profile app adds a reference to a Class Library that is targeting the Full Framework (which it targets by default). You should be able to successfully build such solutions, as long as the Class Library does not use references to assemblies that only exist in the Full Framework. If it does, you may get warning/errors that are not completely clear.
For example you may see an error in your Client Profile app saying: “The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?)”
This error is not clear because the class library exists and can be compiled when it is compiled by itself. However, when MSBuild tries to resolve the transitive closure of the Client Profile project, it cannot find the Full Framework assembly that is referenced by the Class Library. In this case it is better to look at the generated warnings which are more informative: “The referenced assembly " …<your assembly>.." could not be resolved because it has a dependency on ""…<some assembly only available in Full Framework>…” which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.”
4. My controls or 3rd party controls is now showing in the VS 2010 toolbox Some VS 2008 3rd party Winforms controls will not work with VS 2010 NET4 Client Profile projects. The reason is that some of these controls have do not have separate design-time and run-time components and have dependencies on assemblies that are in the Full Framework (for example dependency on System.Windows.Forms.Design.dll which is Full). In VS 2010 RTM we made some changes to make it easier for developers to realize that.
Per the image below you can see that the VS 2008 DevExpress Winforms control are not showing in VS 2010 Toolbox and instead you see the message “Controls in this category are unavailable for the .NET Framework 4 Client Profile. To change this setting, open the Project Properties windows.” The Xceed VS 2008 controls on the other hand do have separate design-time and run-time components and works fine in VS 2008 and VS 2010. The good news is that many of the control vendors plan to release update to their control soon after VS 2010 RTM. Until such updates are available you need to retarget your project to NET4 Full if you must use these controls.
5. What should I do if a component that I need is not in NET4 Client Profile? Your first option is to try to find a workaround by modifying your code to use a component that is included in NET4 Client Profile. If this is not possible retarget your project to NET4 Full. As mentioned before, this is not ideal as most desktops are ikely to only have NET4 Client Profile so your app would need to chain-install NET4 full or block your app setup on NET4 full being present.
6. I want to write a custom WinForms control, what do I need to do for it to work with NET4 Client Profile? When developing Windows Forms control libraries, it is necessary to separate the runtime code from the control designers in order to target the new Client Profile. If the assembly references classes that exist in the Full framework but not in the Client Profile, the project will not compile successfully. Custom control designers usually inherit from the System.Windows.Forms.Design.ControlDesigner class in System.Design.dll, which is not included in .Net Framework 4 Client Profile.
We posted a guide that can walk you through the steps of creating a Windows Forms control that can be used in the .NET Framework 4 Client Profile. See: http://code.msdn.microsoft.com/WinFormsCustomCtrl Note that WPF custom controls do not inherit from classes in System.Design.dll and do not have this issue.
7. What’s the deal with <app.config> file ? If you change the project to target the Full Framework, VS will add a configuration file (<app.config>) that declares the application as a "full" application.
This enables the CLR loader to block any NET4 apps that target full on machines that only have the Client Profile. In this case, the CLR prompts the user to install NET4 full. E.g. you may see this dialog:
Note that in NET4 Beta1 and NET3.5 SP1 Client Profile if the <app.config> was missing the CLR the assumption was that you targeted the Full Framework. This is now reversed. In other words, if your NET4 app is missing <app.config> , by default the CLR assume that your app is targeting NET4 Client Profile! so, your app may crash at random when it needs to load the assemblies that
This has not significantly changed since Beta2, so read my Beta 2 blog. We did make some tweaks however in RTM (and RC), most notably:
Enhancements in NET4 Client Profile vs. NET 3.5 SP1 Client Profile This has not changed since Beta2, so read my Beta 2 blog .
What’s in and what’s not included in the Client Profile? Other than the APIs that were “Grey” out in RTM (and RC) and the tweaks mentioned above, we did not make other significantly changes since Beta2, so read my Beta 2 blog.
Where can I get the NET4 Client Profile? You can get .NET Framework 4 from here:
Related Blogs and Resources
Appendix A:
Here are the files that exist in the NET4 Client Profile and NET4 Full framework.
FileName
Client Profile
or Extended
Description
_DataPerfCounters.h
Client
Perf counters
_DataPerfCounters.ini
_dataperfcounters_shared12_neutral.h
_dataperfcounters_shared12_neutral.ini
_NetworkingPerfCounters.h
_Networkingperfcounters.ini
_NetworkingPerfCounters_v2.h
_NetworkingPerfCounters_v2.ini
_ServiceModelEndpointPerfCounters.h
_ServiceModelEndpointPerfCounters.ini
_ServiceModelOperationPerfCounters.h
_ServiceModelOperationPerfCounters.ini
_ServiceModelServicePerfCounters.h
_ServiceModelServicePerfCounters.ini
_SMSvcHostPerfCounters.h
_SMSvcHostPerfCounters.ini
_TransactionBridgePerfCounters.h
_TransactionBridgePerfCounters.ini
Accessibility.dll
AddInProcess.exe
AddInProcess.exe.config
AddInProcess32.exe
AddInProcess32.exe.config
AddInUtil.exe
AddInUtil.exe.config
AdoNetDiag.dll
adonetdiag.mof
adonetdiag.mof.uninstall
alink.dll
alinkui.dll
AppLaunch.exe
applaunch.exe.config
AssemblyList_4_client.xml
CasPol.exe
caspol.exe.config
clr.dll
CLR.mof
CLR.mof.uninstall
clrjit.dll
CORPerfMonExt.dll
CORPerfMonSymbols.h
corperfmonsymbols.ini
csc.exe
csc.exe.config
cscui.dll
Culture.dll
CustomMarshalers.dll
cvtres.exe
cvtres.exe.config
CvtResUI.dll
default.win32manifest
dfdll.dll
dfsvc.exe
dfsvc.exe.config
diasymreader.dll
DropSqlWorkflowInstanceStoreLogic.sql
DropSqlWorkflowInstanceStoreSchema.sql
dw20.exe
EventLogMessages.dll
fusion.dll
GlobalMonospace.CompositeFont
WPF Composite fonts
GlobalSansSerif.CompositeFont
GlobalSerif.CompositeFont
GlobalUserInterface.CompositeFont
InstallUtil.exe
Moved to Client in RTM
installutil.exe.config
InstallUtilLib.dll
ISymWrapper.dll
jsc.exe
jsc.exe.config
locale.nlp
machine.config
machine.config.comments
machine.config.default
Microsoft.CSharp.dll
Microsoft.JScript.dll
Microsoft.JScript.tlb
Microsoft.Transactions.Bridge.dll
Microsoft.Transactions.Bridge.Dtc.dll
Microsoft.VisualBasic.Activities.Compiler.dll
Microsoft.VisualBasic.Activities.CompilerUI.dll
Microsoft.VisualBasic.Compatibility.Data.dll
Microsoft.VisualBasic.Compatibility.dll
Microsoft.VisualBasic.dll
Microsoft.VisualC.Dll
Microsoft.Windows.ApplicationServer.Applications.dll
Microsoft.Windows.ApplicationServer.Applications.dll.mui
Microsoft.Windows.ApplicationServer.Applications.man
mscordacwks.dll
mscordbi.dll
mscoree.tlb
mscoreei.dll
mscoreeis.dll
mscorlib.dll
mscorlib.tlb
mscorpe.dll
mscorpehost.dll
mscorrc.dll
mscorsecimpl.dll
mscorsecr.dll
mscorsvc.dll
mscorsvw.exe
msvcr100_clr0400.dll
NaturalLanguage6.dll
NETFXRepair.1025.dll
Resource files for .NET OS upgrade repair.
NETFXRepair.1028.dll
NETFXRepair.1029.dll
NETFXRepair.1030.dll
NETFXRepair.1031.dll
NETFXRepair.1032.dll
NETFXRepair.1033.dll
NETFXRepair.1035.dll
NETFXRepair.1036.dll
NETFXRepair.1037.dll
NETFXRepair.1038.dll
NETFXRepair.1040.dll
NETFXRepair.1041.dll
NETFXRepair.1042.dll
NETFXRepair.1043.dll
NETFXRepair.1044.dll
NETFXRepair.1045.dll
NETFXRepair.1046.dll
NETFXRepair.1049.dll
NETFXRepair.1053.dll
NETFXRepair.1055.dll
NETFXRepair.2052.dll
NETFXRepair.2070.dll
NETFXRepair.3076.dll
NETFXRepair.3082.dll
NETFXRepair.exe
ngen.exe
NlsData0009.dll
NlsLexicons0009.dll
nlssorting.dll
normalization.dll
normidna.nlp
normnfc.nlp
normnfd.nlp
normnfkc.nlp
normnfkd.nlp
PenIMC.dll
PerfCounter.dll
PresentationCore.dll
PresentationFramework.Aero.dll
PresentationFramework.Classic.dll
PresentationFramework.dll
PresentationFramework.Luna.dll
PresentationFramework.Royale.dll
PresentationHost_v0400.dll
PresentationHost_v0400.dll.mui
PresentationNative_v0400.dll
PresentationUI.dll
ReachFramework.dll
RegAsm.exe
regasm.exe.config
RegSvcs.exe
regsvcs.exe.config
regtlibv12.exe
SbsNclPerf.dll
ServiceModel.mof
ServiceModel.mof.uninstall
ServiceModel35.mof
ServiceModel35.mof.uninstall
ServiceModelEvents.dll
ServiceModelEvents.dll.mui
ServiceModelInstallRC.dll
ServiceModelInstallRC.dll.mui
ServiceModelPerformanceCounters.dll
ServiceModelPerformanceCounters.dll.mui
ServiceModelPerformanceCounters.man
ServiceModelReg.exe
ServiceModelRegUI.dll
ServiceModelRegUI.dll.mui
SetupUtility.exe
SMDiagnostics.dll
SMSvcHost.exe
SMSvcHost.exe.config
sortdefault.nlp
SOS.dll
SqlWorkflowInstanceStoreLogic.sql
SqlWorkflowInstanceStoreSchema.sql
sysglobl.dll
System.Activities.Core.Presentation.dll
System.Activities.dll
System.Activities.DurableInstancing.dll
System.Activities.Presentation.dll
System.AddIn.Contract.dll
System.AddIn.dll
System.ComponentModel.Composition.dll
System.ComponentModel.DataAnnotations.dll
Moved to Client in RC
System.configuration.dll
System.Configuration.Install.dll
System.Core.dll
System.Data.DataSetExtensions.dll
System.Data.dll
System.Data.Entity.dll
System.Data.Linq.dll
System.Data.Services.Client.dll
System.Data.SqlXml.dll
System.Deployment.dll
System.Device.dll
System.DirectoryServices.AccountManagement.dll
System.DirectoryServices.dll
System.DirectoryServices.Protocols.dll
System.dll
System.Drawing.dll
System.Drawing.tlb
System.Dynamic.dll
System.EnterpriseServices.dll
System.EnterpriseServices.Thunk.dll
System.EnterpriseServices.tlb
System.EnterpriseServices.Wrapper.dll
System.IdentityModel.dll
System.IdentityModel.Selectors.dll
System.IO.Log.dll
System.Management.dll
System.Management.Instrumentation.dll
System.Messaging.dll
System.Net.dll
System.Numerics.dll
System.Printing.dll
System.Runtime.DurableInstancing.dll
System.Runtime.Remoting.dll
System.Runtime.Serialization.dll
System.Runtime.Serialization.Formatters.Soap.dll
System.Security.dll
System.ServiceModel.Activities.dll
System.ServiceModel.Channels.dll
System.ServiceModel.Discovery.dll
System.ServiceModel.dll
System.ServiceModel.Routing.dll
System.ServiceProcess.dll
System.Speech.dll
System.tlb
System.Transactions.dll
System.Web.ApplicationServices.dll
System.Web.Services.dll
System.Windows.Forms.DataVisualization.dll
System.Windows.Forms.dll
System.Windows.Forms.tlb
System.Windows.Input.Manipulations.dll
System.Windows.Presentation.dll
System.Xaml.dll
System.XML.dll
System.Xml.Linq.dll
UIAutomationClient.dll
UIAutomationClientsideProviders.dll
UIAutomationProvider.dll
UIAutomationTypes.dll
vbc.exe
vbc.exe.config
vbc7ui.dll
WindowsBase.dll
WindowsFormsIntegration.dll
WMINet_Utils.dll
wpffontcache_v0400.exe
wpffontcache_v0400.exe.mui
wpfgfx_v0400.dll
wpftxt_v0400.dll
XPThemes.manifest
_DataOracleClientPerfCounters_shared12_neutral.h
Extended
_DataOracleClientPerfCounters_shared12_neutral.ini
addUser.aspx
addUser.aspx.resx
alert_lrg.gif
AppConfigCommon.resx
AppConfigHome.aspx
AppConfigHome.aspx.resx
ApplicationConfigurationPage.cs
AppSetting.ascx
AppSetting.ascx.resx
ASPdotNET_logo.jpg
Aspnet.config
aspnet.mof
aspnet.mof.uninstall
aspnet_compiler.exe
aspnet_counters.dll
aspnet_filter.dll
aspnet_isapi.dll
Aspnet_perf.dll
aspnet_perf.h
aspnet_perf.ini
aspnet_perf2.ini
aspnet_rc.dll
aspnet_regbrowsers.exe
aspnet_regiis.exe
aspnet_regsql.exe
aspnet_state.exe
aspnet_state_perf.h
aspnet_state_perf.ini
aspnet_wp.exe
AspNetMMCExt.dll
aspx_file.gif
AssemblyList_4_extended.xml
blackberry.browser
branding_Full2.gif
chooseProviderManagement.aspx
chooseProviderManagement.aspx.resx
chrome.browser
CLR-ETW.man
clretwrc.dll
ComSvcConfig.exe
confirmation.ascx
confirmation.ascx.resx
CreateAppSetting.aspx
CreateAppSetting.aspx.resx
createPermission.aspx
createPermission.aspx.resx
csc.rsp
darkBlue_GRAD.jpg
DataSvcUtil.exe
DataSvcUtil.exe.config
DebugAndTrace.aspx
DebugAndTrace.aspx.resx
default.aspx
default.aspx.resx
Default.browser
DefaultWsdlHelpGenerator.aspx
DefineErrorPage.aspx
DefineErrorPage.aspx.resx
deselectedTab_1x1.gif
DropSqlPersistenceProviderLogic.sql
DropSqlPersistenceProviderSchema.sql
dv_aspnetmmc.chm
EditAppSetting.aspx
EditAppSetting.aspx.resx
editUser.aspx
editUser.aspx.resx
EdmGen.exe
error.aspx
error.aspx.resx
FileTracker.dll
FileTrackerUI.dll
findUsers.aspx
findUsers.aspx.resx
firefox.browser
folder.gif
gateway.browser
generic.browser
GlobalResources.resx
gradient_onBlue.gif
gradient_onWhite.gif
GroupedProviders.xml
headerGRADIENT_Tall.gif
help.jpg
HelpIcon_solid.gif
home0.aspx
home0.aspx.resx
home1.aspx
home1.aspx.resx
home2.aspx
home2.aspx.resx
ie.browser
iemobile.browser
ilasm.exe
ilasm.exe.config
image1.gif
image2.gif
InstallCommon.sql
InstallMembership.sql
InstallPersistSqlState.sql
InstallPersonalization.sql
InstallProfile.SQL
InstallRoles.sql
InstallSqlState.sql
InstallSqlStateTemplate.sql
InstallWebEventSqlProvider.sql
iPhone.browser
legacy.web_hightrust.config
legacy.web_hightrust.config.default
legacy.web_lowtrust.config
legacy.web_lowtrust.config.default
legacy.web_mediumtrust.config
legacy.web_mediumtrust.config.default
legacy.web_minimaltrust.config
legacy.web_minimaltrust.config.default
manageAllRoles.aspx
manageAllRoles.aspx.resx
ManageAppSettings.aspx
ManageAppSettings.aspx.resx
ManageConsolidatedProviders.aspx
manageconsolidatedProviders.aspx.resx
managePermissions.aspx
managePermissions.aspx.resx
ManageProviders.aspx
manageProviders.aspx.resx
manageSingleRole.aspx
manageSingleRole.aspx.resx
manageUsers.aspx
manageUsers.aspx.resx
Microsoft.Build.Commontypes.xsd
Microsoft.Build.Conversion.v4.0.dll
Microsoft.Build.Core.xsd
Microsoft.Build.dll
Microsoft.Build.Engine.dll
Microsoft.Build.Framework.dll
Microsoft.Build.Tasks.v4.0.dll
Microsoft.Build.Utilities.v4.0.dll
Microsoft.Build.xsd
Microsoft.Common.OverrideTasks
Microsoft.Common.targets
Microsoft.Common.Tasks
Microsoft.CSharp.targets
Microsoft.Data.Entity.Build.Tasks.dll
Microsoft.Data.Entity.targets
Microsoft.NetFramework.props
Microsoft.NetFramework.targets
Microsoft.VisualBasic.targets
Microsoft.VisualC.STLCLR.dll
Microsoft.WinFx.targets
Microsoft.Workflow.Compiler.exe
Microsoft.Workflow.Compiler.exe.config
Microsoft.Xaml.targets
MmcAspExt.dll
MSBuild.exe
msbuild.exe.config
MSBuild.rsp
mscorsn.dll
navigationBar.ascx
navigationBar.ascx.resx
NavigationBar.cs
NetFx40_IIS_schema_update.xml
netmemorycache.h
netmemorycache.ini
opera.browser
PasswordValueTextBox.cs
PerfCounters.h
PerfCounters.ini
peverify.dll
PresentationBuildTasks.dll
ProviderList.ascx
providerList.ascx.resx
ProvidersPage.cs
requiredBang.gif
safari.browser
security.aspx
security.aspx.resx
security_watermark.jpg
security0.aspx
security0.aspx.resx
SecurityPage.cs
selectedTab_1x1.gif
selectedTab_leftCorner.gif
selectedTab_rightCorner.gif
ServiceMonikerSupport.dll
setUpAuthentication.aspx
setUpAuthentication.aspx.resx
SharedReg12.dll
SmtpSettings.aspx
SmtpSettings.aspx.resx
SqlPersistenceProviderLogic.sql
SqlPersistenceProviderSchema.sql
SqlPersistenceService_Logic.sql
SqlPersistenceService_Schema.sql
System.Data.Entity.Design.dll
System.Data.OracleClient.dll
System.Data.Services.Design.dll
System.Data.Services.dll
System.Design.dll
System.Drawing.Design.dll
System.Runtime.Caching.dll
System.ServiceModel.Activation.dll
System.ServiceModel.ServiceMoniker40.dll
System.ServiceModel.WasHosting.dll
System.ServiceModel.Web.dll
System.Web.Abstractions.dll
System.Web.DataVisualization.Design.dll
System.Web.DataVisualization.dll
System.Web.dll
System.Web.DynamicData.Design.dll
System.Web.DynamicData.dll
System.Web.Entity.Design.dll
System.Web.Entity.dll
System.Web.Extensions.Design.dll
System.Web.Extensions.dll
System.Web.Mobile.dll
System.Web.RegularExpressions.dll
System.Web.Routing.dll
System.Web.tlb
System.Windows.Forms.DataVisualization.Design.dll
System.Workflow.Activities.dll
System.Workflow.ComponentModel.dll
System.Workflow.Runtime.dll
System.WorkflowServices.dll
System.Xaml.Hosting.dll
TLBREF.DLL
topGradRepeat.jpg
Tracking_Logic.sql
Tracking_Schema.sql
UninstallCommon.sql
UninstallMembership.sql
UninstallPersistSqlState.sql
UninstallPersonalization.sql
UnInstallProfile.SQL
UninstallRoles.sql
UninstallSqlState.sql
UninstallSqlStateTemplate.sql
UninstallWebEventSqlProvider.sql
unSelectedTab_leftCorner.gif
unSelectedTab_rightCorner.gif
vbc.rsp
web.config
web.config.comments
web.config.default
web_hightrust.config
web_hightrust.config.default
web_lowtrust.config
web_lowtrust.config.default
web_mediumtrust.config
web_mediumtrust.config.default
web_minimaltrust.config
web_minimaltrust.config.default
webAdmin.master
webAdminButtonRow.master
WebAdminHelp.aspx
WebAdminHelp.aspx.resx
WebAdminHelp_Application.aspx
WebAdminHelp_Application.aspx.resx
WebAdminHelp_Internals.aspx
WebAdminHelp_Internals.aspx.resx
WebAdminHelp_Provider.aspx
WebAdminHelp_Provider.aspx.resx
WebAdminHelp_Security.aspx
WebAdminHelp_Security.aspx.resx
webAdminNoButtonRow.master
webAdminNoNavBar.master
WebAdminPage.cs
WebAdminStyles.css
WebAdminWithConfirmation.master
WebAdminWithConfirmationNoButtonRow.master
webengine.dll
webengine4.dll
wizard.aspx
wizard.aspx.resx
wizardAddUser.ascx
wizardAddUser.ascx.resx
wizardAuthentication.ascx
wizardAuthentication.ascx.resx
wizardCreateRoles.ascx
wizardCreateRoles.ascx.resx
wizardFinish.ascx
wizardFinish.ascx.resx
wizardInit.ascx
wizardInit.ascx.resx
WizardPage.cs
wizardPermission.ascx
wizardPermission.ascx.resx
wizardProviderInfo.ascx
wizardProviderInfo.ascx.resx
Workflow.Targets
Workflow.VisualBasic.Targets
wpf-etw.man
WsatConfig.exe
XamlBuildTask.dll
yellowCORNER.gif
Today (4/12/2010) we are excited to make the final .NET Framework 4 RTM build available. It can be downloaded from here and the .NET Framework 4 Client Profile is available from here. You can also check out Soma’s blog officially announcing Visual Studio 2010 which built on top of WPF 4. In previous related blogs I discussed the performance improvements we implemented in WPF in .NET 3.5 SP1 and .NET 3.5/3.0 SP1 (see here, and here). There are many improvements and new features in the WPF 4 release that we are really excited about (read more about those here and here) , but in this post I mainly wanted to focus and provide more details on the specific performance improvements we implemented in WPF 4.
1. New “Cached Composition” API to significantly improve rendering perf of complex visual trees This API provides apps the ability to cache a live UIElement and its sub-tree as a bitmap, and then render the UIElement as quickly as a bitmap (not requiring full rerasterization) when there are no structural changes to the cached subtree.
Transforms, opacities, etc applied above the cached UIElement do not force the cache to be regenerated. The UIElement remains fully interactive while cached, and fully mouse-interactive.
Motivation: Despite hardware acceleration, WPF’s rendering performance throughput is often limited by all the per-primitive work that must be done when rendering complex scenarios. Without this caching, simply animating an otherwise static element across the screen forces that element to be repeatedly be completely re-tessellated and re-rasterized which can be expensive operations. This often leaves WPF’s rendering pipeline bottlenecked in CPU-bound per-primitive setup cost.
The API enables breaking that bottleneck and allows primitives to be rendered as fast as the video card can draw a quad, moving the bottleneck from CPU primitive setup to GPU fill-rate, which is usually dramatically faster.
In doing this, there can be some loss of visual quality for the sake of performance. Many scenarios would gladly make this tradeoff. Scenarios that could benefit from this API:
See UIElement.CacheMode and BitmapCacheBrush for more details. Example: Setting CacheMode through C#:
UIElement.CacheMode= new BitmapCache();
Setting CacheMode though XAML:
<Rectangle CacheMode="BitmapCache" /><Rectangle> <Rectangle.CacheMode> <BitmapCache EnableClearType="true" RenderAtScale="4"/> </Rectangle.CacheMode></Rectangle>
2. New API to allow WPF apps to force SW rendering per process In NET 3.5 SP1 we added new API to allow developers to force software rendering per application window instead of using the GPU (see my Performance improvements in WPF in .Net 3.5 / 3.0 SP1 blog), in NET 4 you can now do so for the entire process.
As reported (see here), depending on the machine configuration and the application, software-based rendering is sometimes faster than hardware. This could improve rendering performance for certain scenarios and machines configuration, in most cases Hardware rendering should perform better. Please use carefully and verify with your app and machine configuration. In certain cases apps may want to use Software rendering for reliability reasons, for example on machines (typically older) that do not have reliable drivers. This APIs should provide developers a much better alternative than setting the global ‘Disable HW Acceleration’ registry key (see here)
ee
)
VS 2010 for example is using this feature to force VS 2010 into Software rendering on VMs thus improving reliability. VS 2010 is doing so since some VMs graphic emulation drivers found VS 2010 is doing so since some VMs graphic emulation drivers found not to be reliable. Here is an example for how to use this API:
public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { if (WeThinkWeShouldRenderInSoftware()) RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; }}
Notes: I) The precedence order for software rendering is:
II) The app force Software rendering at any time, however there is no way to force Hardware rendering back on once it was set to SoftwareOnly.
3. Added new VisualScrollableAreaClip API This allows line-scroll scenarios (e.g: line scroll in editor) to update less area and therefore be significantly more efficient over Remote Desktop (RDP) and Terminal Services scenarios.
The VS 2010 editor which is WOPF-based for example is taking advantage of this api.
(You can read more about Optimizing WPF for Remote Desktop here)
4. The default RenderOptions.BitmapScalingMode default is now changed Linear instead of Fant. This should provide some perf improvement if you scale images. but will produces lower quality output so be aware of this. If you still want Fant, you can re-enable it.
4. Minor 3D performance improvements. We reduced the amount of DrawPrimitive() calls for large indexed meshes and slightly improved CPU usage for large Model3D counts.
5. The BitmapEffect classes are now no-ops. BitmapEffect used to render in Software and caused perf issues. BitmapEffect are still there so your apps will compile but BitmapEffect will not do anything.
6. Some minor changes to Graphics Rendering Tier classification Pixel Shader 2.0 is now required for hardware acceleration. If your card was Tier 1 but did not have PS 2.0 it is now considered Tier 0 causing your app to render in Software.
1. Significantly improved UI Automation (UIA) performance. Two major improvements went into this effort:
A) Added UI Automation virtualization support.
This allows WPF apps that target NET4 and have virtualized elements (such as ListView, Tree View, etc ) to benefits from significantly improved performance on tablets and touch-enabled machines as well as none-Tablet machines that have Accessibility clients running (for example: Screen Reader or even have external input device like a pen or Wacom tablet) To use UIA virtualization WPF 4 is taking advantage the Windows Automation API 3.0 (aka "UI Automation API 3.0" or “UIA 3.0”). UIA 3.0 is included by default on Windows 7 & Windows 2008 Server R2. The gotcha is that the Windows Automation API 3.0 are not included on other down-level OS's (such as XP/Vista) and must be installed separately in order to get the full Perf benefits. See more in this blog.
This allows WPF apps that target NET4 and have virtualized elements (such as ListView, Tree View, etc ) to benefits from significantly improved performance on tablets and touch-enabled machines as well as none-Tablet machines that have Accessibility clients running (for example: Screen Reader or even have external input device like a pen or Wacom tablet)
To use UIA virtualization WPF 4 is taking advantage the Windows Automation API 3.0 (aka "UI Automation API 3.0" or “UIA 3.0”). UIA 3.0 is included by default on Windows 7 & Windows 2008 Server R2. The gotcha is that the Windows Automation API 3.0 are not included on other down-level OS's (such as XP/Vista) and must be installed separately in order to get the full Perf benefits. See more in this blog.
B) Optimized event handling
We addressed UI Automation issues mentioned in this blog In .NET 3.5 SP1 or earlier, performance problems (such as CPU consumption and generally sluggishness) were especially noticeable when scrolling within an application that contained many visual elements and if UIA client applications were running. In some cases WPF had to traverse every element in the application tree to check if it need to fire automation event. Depending on machine speed and how many elements are in an application’s visual tree this had significant performance impact. This was typical on Tablet and other touch-enabled machines because the Accessibility client TabTip.exe (the "Tablet PC Input Panel") is running by default. It was also possible on non-tablet machines since any machine can run UI Automation client app (for example, UI Spy, Narrator, Magnifier, etc) or had devices connected that also use UI Automation (for example, Wacom touch & pen input type device) In WPF 4 we fixed these performance issues.
We addressed UI Automation issues mentioned in this blog
In .NET 3.5 SP1 or earlier, performance problems (such as CPU consumption and generally sluggishness) were especially noticeable when scrolling within an application that contained many visual elements and if UIA client applications were running. In some cases WPF had to traverse every element in the application tree to check if it need to fire automation event. Depending on machine speed and how many elements are in an application’s visual tree this had significant performance impact.
This was typical on Tablet and other touch-enabled machines because the Accessibility client TabTip.exe (the "Tablet PC Input Panel") is running by default.
It was also possible on non-tablet machines since any machine can run UI Automation client app (for example, UI Spy, Narrator, Magnifier, etc) or had devices connected that also use UI Automation (for example, Wacom touch & pen input type device)
In WPF 4 we fixed these performance issues.
1. WPF4 now use DirectWrite for much improved text clarity This is not really perf per-se but it worth mentioning here. You can read more in Additional WPF Text Clarity Improvements and Direct2D and DirectWrite posts.
2. Improve text speed WPF4 English text is somewhat faster (~10%) compare to WPF 3.5 SP1
1. Much improved NET4 Full & Client Profile size and deployment performance. See graph comparing NETFX sizes:
2. NET4 Client Profile is now “first class citizen” Unlike NET 3.5 SP1 Client Profile, NET4 Client Profile:
Read more about NET4 Client Profile in this blog.