Alois Kraus

blog

  Home  |   Contact  |   Syndication    |   Login
  114 Posts | 8 Stories | 297 Comments | 162 Trackbacks

News



Article Categories

Archives

Post Categories

Image Galleries

Programming

It is about time to look at the new .NET Framework 4.5 release along with the brand new Visual Studio 11 Beta 1. Besides the new features I wanted to see if the massive performance complaints have been taken and addressed. First the good things. VS11 Beta 1 does start a lot quicker as its predecessors. It is nearly as fast as VS2008 which was from the performance aspect the best release since VS6. This is great news. Below are some numbers I did compile on my Windows 7 x32 PC with a Intel Duo 6600 2,4GHz and an Intel X25M Postville SSD.

*** Disclaimer I do know it is still beta and performance is not a prime concern at this stage but still I do want to know if there are already changes in it for the better or worse. ***

For starters I did the usual stuff most people do during their daily work.

  • Start Visual Studio (warm startup).
  • Open a .cs file from the explorer.
  • Open a default Windows Forms solution (time is measured until the property grid is visible).

 

image

Starting VS11 Beta 1 feels a lot faster compared to VS2010. This is a good thing and as far as I can see a lot of effort has been put into this improvement to get nearly as fast as VS2008 which has at this point of time executed only native code and not a single line of managed code yet (the CLR is not even started!). It seems that the startup sequence was completely overhauled to get this big performance boost. As software developer I do know that the prime architectural principle behind this change is to delay loading of stuff until it is really needed. This is reflected by the Open Solution graph which makes it very clear that VS itself got not faster but the stuff is loaded only at a later point in time. In fact opening a solution is a bit slower compared to VS2010.

The lazy loading pays off when you try to open a .cs file from the explorer to use it as a better editor. Beta 1 has become much better (nearly a factor 2) due to this changes. VS2008 was the last edition where I did simply click on a .cs file to open it with a new VS instance. But now it is nearly as fast as VS2008 which is really good.

Next comes memory consumption. I have checked the following use cases

  • Open Windows Forms solution and debug it.
  • Open Windows Forms solution and rebuild it.

image

Memory consumption (private bytes) has tripled compared to VS2008. Big productivity gains and big memory consumption seem to be strongly tied together. Moving to the managed world has its costs but the productivity benefits (remember COM? with Windows 8 it is back ;-)) compared to hand crafted C++ code are enormous. You are able to create sophisticated algorithms in .NET much faster compared to C++ where you have a huge set of libraries at hand which do interoperate seamlessly together.

The only problem with such high memory footprints is that the application will lag from time to time because a full GC is running or the OS is paging memory out/in from/to the page file. These lags can cause significant grief for the users of an application with high memory usage but this is the price you have to pay for giving up explicit memory management and moving into a virtual machine.

Apropos memory usage. When you open a windows forms application in all Visual Studio editions you get some interesting pictures.

VS2011beta1

The most notable thing is that the WPF designer,  MSBuild (not shown here) and others are moved into separate processes outside of Visual Studio. My guess is that this was a deliberate decision to become more scalable. If you have e.g. a small WF application and you use the WF designer (this thing has been improved at last) you can get with a decent xaml (~700KB) a VS instance which has over 800 MB of working set. Since 32 bit managed applications can only consume about 1.3GB of memory there is not much left for other stuff (e.g. a bigger solution with many targets). You hit with VS the out of memory wall quite easy once your solution becomes bigger and more complex. The only options left are to make a 64 bit VS (not yet there) or to factor out memory intensive services into separate processes as it is done with VS11 obviously. Rico Mariani has a nice post from 2009 covering why they decided to not make Visual Studio 2010 64 bit. From a naive perspective this makes sense since at its heart it is a fancy editor. If you need more than 2GB of RAM then something is wrong with your implementation. As it is today VS works very well with small projects but fails miserably when confronted with huge solutions. Scalability is (has been?) not a top priority of the MS engineers. Especially these WPF designers tend to consume huge amounts of memory once many UI elements are involved. I still fail to understand why the VS Ultimate DGML Viewer consumes additional 300MB if you load a 3 MB dgml file (~3000 nodes) or simply crashes when too much data (too much can be quite subjective) is thrown into it. I wonder where in WPF the memory is lost. A scalable UI should not create visual elements until they are visible or smaller than 1 or 2 pixel. This should the a simple matter by checking the bounding rectangle. An even more sophisticated scalable UI would unload the visual elements when they become invisible again.

 

That was the Visual Studio part. And now to something completely different.

What has changed from .NET 4.0 to 4.5?

I have compiled a list of public BCL Changes into a text file with my little Apichange tool. The command line used to get this report was

ApiChange.exe -diff -new "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\*.dll"  -old "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\*.dll"

The most interesting parts are of course in mscorlib

mscorlib.dll has 337 changes
    Added 71 public type/s
        + public interface System.Collections.Generic.IReadOnlyList<T>
        + public interface System.IProgress<T>
        + public class System.Progress<T>
        + public interface System.Reflection.IReflectableType
        + public class System.Reflection.TypeInfo
        + public class System.WeakReference<T>
        + public class System.Threading.Volatile
        + public class System.Diagnostics.Tracing.EventSource
        + public class System.Threading.Tasks.ConcurrentExclusiveSchedulerPair
        + public interface System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>
        + public class System.Collections.ObjectModel.ReadOnlyDictionary<TKey,TValue>
        + public enum System.Collections.Concurrent.EnumerablePartitionerOptions
        + public class System.Diagnostics.Tracing.EventListener
        + public class System.Diagnostics.Tracing.EventCommandEventArgs
        + public class System.Diagnostics.Tracing.EventWrittenEventArgs
        + public class System.Diagnostics.Tracing.EventSourceAttribute
        + public class System.Diagnostics.Tracing.EventAttribute
        + public class System.Diagnostics.Tracing.NonEventAttribute
        + public enum System.Diagnostics.Tracing.EventCommand
        + public class System.Diagnostics.Tracing.EventSourceException
        + public enum System.Diagnostics.Tracing.EventLevel
        + public enum System.Diagnostics.Tracing.EventTask
        + public enum System.Diagnostics.Tracing.EventOpcode
        + public enum System.Diagnostics.Tracing.EventKeywords
        + public class System.Diagnostics.Contracts.ContractArgumentValidatorAttribute
        + public class System.Diagnostics.Contracts.ContractAbbreviatorAttribute
        + public class System.Diagnostics.Contracts.ContractOptionAttribute
        + public class System.Runtime.CompilerServices.ContractHelper
        + public class System.Reflection.AssemblyMetadataAttribute
        + public class System.Reflection.AssemblySignatureKeyAttribute
        + public enum System.Reflection.AssemblyContentType
        + public class System.Reflection.CustomAttributeExtensions
        + public class System.Reflection.IntrospectionExtensions
        + public class System.Reflection.RuntimeExtensions.RuntimeReflectionExtensions
        + public class System.Reflection.ReflectionContext
        + public class System.Runtime.ExceptionServices.ExceptionDispatchInfo
        + public class System.Globalization.SortVersion
        + public class System.Security.Claims.ClaimsIdentity
        + public class System.Security.Claims.ClaimsPrincipal
        + public class System.Security.Claims.Claim
        + public class System.Security.Claims.ClaimsSerializationBehavior
        + public class System.Security.Claims.ClaimTypes
        + public class System.Security.Claims.ClaimValueTypes
        + public enum System.Runtime.InteropServices.DllImportSearchPath
        + public class System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute
        + public class System.Runtime.InteropServices.WindowsRuntime.DefaultInterfaceAttribute
        + public class System.Runtime.InteropServices.WindowsRuntime.InterfaceImplementedInVersionAttribute
        + public struct System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken
        + public class System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T>
        + public interface System.Runtime.InteropServices.WindowsRuntime.IActivationFactory
        + public class System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal
        + public class System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata
        + public class System.Runtime.InteropServices.WindowsRuntime.NamespaceResolveEventArgs
        + public class System.Runtime.CompilerServices.ExtensionAttribute
        + public class System.Runtime.CompilerServices.CallerFilePathAttribute
        + public class System.Runtime.CompilerServices.CallerLineNumberAttribute
        + public class System.Runtime.CompilerServices.CallerMemberNameAttribute
        + public struct System.Runtime.CompilerServices.AsyncVoidMethodBuilder
        + public struct System.Runtime.CompilerServices.AsyncTaskMethodBuilder
        + public struct System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>
        + public interface System.Runtime.CompilerServices.IAsyncStateMachine
        + public interface System.Runtime.CompilerServices.INotifyCompletion
        + public interface System.Runtime.CompilerServices.ICriticalNotifyCompletion
        + public struct System.Runtime.CompilerServices.TaskAwaiter
        + public struct System.Runtime.CompilerServices.TaskAwaiter<TResult>
        + public struct System.Runtime.CompilerServices.ConfiguredTaskAwaitable
        + public struct System.Runtime.CompilerServices.ConfiguredTaskAwaitable<TResult>
        + public struct System.Runtime.CompilerServices.YieldAwaitable
        + public class System.Runtime.ProfileOptimization
        + public struct System.Reflection.Emit.ExceptionHandler
        + public class System.Runtime.DesignerServices.WindowsRuntimeDesignerContext
    public class System.Exception
        + public int get_HResult()
        - protected int get_HResult()
    public struct System.ArraySegment<T>
        + interface: System.Collections.Generic.IList`1<T>
        + interface: System.Collections.Generic.ICollection`1<T>
        + interface: System.Collections.Generic.IReadOnlyList`1<T>
        + interface: System.Collections.Generic.IEnumerable`1<T>
        + interface: System.Collections.IEnumerable
        + public virtual int get_Count()
        - public int get_Count()
    public class System.AppDomainSetup
        + public string get_TargetFrameworkName()
        + public void set_TargetFrameworkName(String value)
        + public void SetNativeFunction(String functionName,Int32 functionVersion,IntPtr functionPointer)
    public class System.Console
        + public static bool get_IsInputRedirected()
        + public static bool get_IsOutputRedirected()
        + public static bool get_IsErrorRedirected()
    public class System.Environment
        + public static int get_CurrentManagedThreadId()
    public class System.GC
        + public static void Collect(Int32 generation,GCCollectionMode mode,Boolean blocking)
    public class System.Reflection.MemberInfo
        + public virtual IEnumerable<CustomAttributeData> get_CustomAttributes()
    public class System.Type
        + public virtual bool get_IsConstructedGenericType()
        + public virtual System.Type[] get_GenericTypeArguments()
    public class System.Threading.EventWaitHandle
        + public static bool TryOpenExisting(String name,out EventWaitHandle result)
        + public static bool TryOpenExisting(String name,EventWaitHandleRights rights,out EventWaitHandle result)
    public class System.Threading.Interlocked
        + public static void MemoryBarrier()
    public class System.Threading.Monitor
        + public static bool IsEntered(Object obj)
    public class System.Threading.Mutex
        + public static bool TryOpenExisting(String name,out Mutex result)
        + public static bool TryOpenExisting(String name,MutexRights rights,out Mutex result)
    public class System.Threading.Timeout
        + public static readonly System.TimeSpan InfiniteTimeSpan
    public class System.Threading.ThreadLocal<T>
        + public IList<T> get_Values()
        + public void .ctor(Boolean trackAllValues)
        + public void .ctor(Func<T> valueFactory,Boolean trackAllValues)
    public class System.Threading.SemaphoreSlim
        + public System.Threading.Tasks.Task WaitAsync()
        + public System.Threading.Tasks.Task WaitAsync(CancellationToken cancellationToken)
        + public Task<bool> WaitAsync(Int32 millisecondsTimeout)
        + public Task<bool> WaitAsync(TimeSpan timeout)
        + public Task<bool> WaitAsync(TimeSpan timeout,CancellationToken cancellationToken)
        + public Task<bool> WaitAsync(Int32 millisecondsTimeout,CancellationToken cancellationToken)
    public class System.Threading.CancellationTokenSource
        + public void CancelAfter(TimeSpan delay)
        + public void CancelAfter(Int32 millisecondsDelay)
        + public void .ctor(TimeSpan delay)
        + public void .ctor(Int32 millisecondsDelay)
        + protected virtual void Dispose(Boolean disposing)
    public class System.Threading.Tasks.Task
        + public System.Runtime.CompilerServices.TaskAwaiter GetAwaiter()
        + public System.Runtime.CompilerServices.ConfiguredTaskAwaitable ConfigureAwait(Boolean continueOnCapturedContext)
        + public static System.Runtime.CompilerServices.YieldAwaitable Yield()
        + public System.Threading.Tasks.Task ContinueWith(Action<Task,object> continuationAction,Object state)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task,object> continuationAction,Object state,CancellationToken cancellationToken)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task,object> continuationAction,Object state,TaskScheduler scheduler)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task,object> continuationAction,Object state,TaskContinuationOptions continuationOptions)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task,object> continuationAction,Object state,CancellationToken cancellationToken,TaskContinuationOptions continuationOptions,TaskScheduler scheduler)
        + public Task<TResult> ContinueWith(Func<Task,object,TResult> continuationFunction,Object state)
        + public Task<TResult> ContinueWith(Func<Task,object,TResult> continuationFunction,Object state,CancellationToken cancellationToken)
        + public Task<TResult> ContinueWith(Func<Task,object,TResult> continuationFunction,Object state,TaskScheduler scheduler)
        + public Task<TResult> ContinueWith(Func<Task,object,TResult> continuationFunction,Object state,TaskContinuationOptions continuationOptions)
        + public Task<TResult> ContinueWith(Func<Task,object,TResult> continuationFunction,Object state,CancellationToken cancellationToken,TaskContinuationOptions continuationOptions,TaskScheduler scheduler)
        + public static Task<TResult> FromResult(TResult result)
        + public static System.Threading.Tasks.Task Run(Action action)
        + public static System.Threading.Tasks.Task Run(Action action,CancellationToken cancellationToken)
        + public static Task<TResult> Run(Func<TResult> function)
        + public static Task<TResult> Run(Func<TResult> function,CancellationToken cancellationToken)
        + public static System.Threading.Tasks.Task Run(Func<Task> function)
        + public static System.Threading.Tasks.Task Run(Func<Task> function,CancellationToken cancellationToken)
        + public static Task<TResult> Run(Func<Task<TResult>> function)
        + public static Task<TResult> Run(Func<Task<TResult>> function,CancellationToken cancellationToken)
        + public static System.Threading.Tasks.Task Delay(TimeSpan delay)
        + public static System.Threading.Tasks.Task Delay(TimeSpan delay,CancellationToken cancellationToken)
        + public static System.Threading.Tasks.Task Delay(Int32 millisecondsDelay)
        + public static System.Threading.Tasks.Task Delay(Int32 millisecondsDelay,CancellationToken cancellationToken)
        + public static System.Threading.Tasks.Task WhenAll(IEnumerable<Task> tasks)
        + public static System.Threading.Tasks.Task WhenAll(Task[] tasks)
        + public static Task<TResult[]> WhenAll(IEnumerable<Task<TResult>> tasks)
        + public static Task<TResult[]> WhenAll(Task`1[] tasks)
        + public static Task<Task> WhenAny(Task[] tasks)
        + public static Task<Task> WhenAny(IEnumerable<Task> tasks)
        + public static Task<Task<TResult>> WhenAny(Task`1[] tasks)
        + public static Task<Task<TResult>> WhenAny(IEnumerable<Task<TResult>> tasks)
    public class System.Threading.Tasks.Task<TResult>
        + public TaskAwaiter<TResult> GetAwaiter()
        + public ConfiguredTaskAwaitable<TResult> ConfigureAwait(Boolean continueOnCapturedContext)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task<TResult>object> continuationAction,Object state)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task<TResult>object> continuationAction,Object state,CancellationToken cancellationToken)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task<TResult>object> continuationAction,Object state,TaskScheduler scheduler)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task<TResult>object> continuationAction,Object state,TaskContinuationOptions continuationOptions)
        + public System.Threading.Tasks.Task ContinueWith(Action<Task<TResult>object> continuationAction,Object state,CancellationToken cancellationToken,TaskContinuationOptions continuationOptions,TaskScheduler scheduler)
        + public Task<TNewResult> ContinueWith(Func<Task<TResult>object,TNewResult> continuationFunction,Object state)
        + public Task<TNewResult> ContinueWith(Func<Task<TResult>object,TNewResult> continuationFunction,Object state,CancellationToken cancellationToken)
        + public Task<TNewResult> ContinueWith(Func<Task<TResult>object,TNewResult> continuationFunction,Object state,TaskScheduler scheduler)
        + public Task<TNewResult> ContinueWith(Func<Task<TResult>object,TNewResult> continuationFunction,Object state,TaskContinuationOptions continuationOptions)
        + public Task<TNewResult> ContinueWith(Func<Task<TResult>object,TNewResult> continuationFunction,Object state,CancellationToken cancellationToken,TaskContinuationOptions continuationOptions,TaskScheduler scheduler)
    public enum System.Threading.Tasks.TaskCreationOptions
        + public const System.Threading.Tasks.TaskCreationOptions DenyChildAttach - Value: 8
        + public const System.Threading.Tasks.TaskCreationOptions HideScheduler - Value: 16
    public enum System.Threading.Tasks.TaskContinuationOptions
        + public const System.Threading.Tasks.TaskContinuationOptions DenyChildAttach - Value: 8
        + public const System.Threading.Tasks.TaskContinuationOptions HideScheduler - Value: 16
        + public const System.Threading.Tasks.TaskContinuationOptions LazyCancellation - Value: 32
    public class System.Threading.Tasks.TaskScheduler
        - protected virtual void Finalize()
    public class System.Collections.Generic.Comparer<T>
        + public static Comparer<T> Create(Comparison<T> comparison)
    public class System.Collections.Generic.Dictionary<TKey,TValue>
        + interface: System.Collections.Generic.IReadOnlyDictionary`2<TKey,TValue>
    public interface System.Collections.Generic.IList<T>
        + interface: System.Collections.Generic.ICollection`1<T>
        - interface: System.Collections.Generic.ICollection`1<TKey>
    public class System.Collections.Generic.List<T>
        + interface: System.Collections.Generic.ICollection`1<T>
        + interface: System.Collections.Generic.IReadOnlyList`1<T>
        - interface: System.Collections.Generic.ICollection`1<TKey>
    public class System.Collections.ObjectModel.Collection<T>
        + interface: System.Collections.Generic.ICollection`1<T>
        + interface: System.Collections.Generic.IReadOnlyList`1<T>
        - interface: System.Collections.Generic.ICollection`1<TKey>
    public class System.Collections.ObjectModel.ReadOnlyCollection<T>
        + interface: System.Collections.Generic.ICollection`1<T>
        + interface: System.Collections.Generic.IReadOnlyList`1<T>
        - interface: System.Collections.Generic.ICollection`1<TKey>
        + public virtual T get_Item(Int32 index)
        - public T get_Item(Int32 index)
    public class System.Collections.Concurrent.Partitioner
        + public static OrderablePartitioner<TSource> Create(IEnumerable<TSource> source,EnumerablePartitionerOptions partitionerOptions)
    public class System.Reflection.Assembly
        + public virtual IEnumerable<Type> get_ExportedTypes()
        + public virtual IEnumerable<TypeInfo> get_DefinedTypes()
        + public virtual IEnumerable<CustomAttributeData> get_CustomAttributes()
        + public virtual IEnumerable<Module> get_Modules()
    public class System.Reflection.AssemblyName
        + public string get_CultureName()
        + public System.Reflection.AssemblyContentType get_ContentType()
        + public void set_ContentType(AssemblyContentType value)
    public enum System.Reflection.ProcessorArchitecture
        + public const System.Reflection.ProcessorArchitecture Arm - Value: 5
    public class System.Reflection.CustomAttributeData
        + public System.Type get_AttributeType()
    public struct System.Reflection.CustomAttributeNamedArgument
        + public string get_MemberName()
        + public bool get_IsField()
    public enum System.Reflection.MethodImplAttributes
        + public const System.Reflection.MethodImplAttributes AggressiveInlining - Value: 256
    public enum System.Reflection.PortableExecutableKinds
        + public const System.Reflection.PortableExecutableKinds Preferred32Bit - Value: 16
    public enum System.Reflection.ImageFileMachine
        + public const System.Reflection.ImageFileMachine ARM - Value: 452
    public class System.Reflection.Module
        + public virtual IEnumerable<CustomAttributeData> get_CustomAttributes()
    public enum System.Reflection.TypeAttributes
        + public const System.Reflection.TypeAttributes WindowsRuntime - Value: 16384
    public class System.Reflection.TypeDelegator
        Base type changed: System.Type -> System.Reflection.TypeInfo
        + public virtual bool IsAssignableFrom(TypeInfo typeInfo)
        + public virtual bool get_IsConstructedGenericType()
    public class System.Reflection.MethodBase
        + public virtual System.Reflection.MethodImplAttributes get_MethodImplementationFlags()
    public class System.Reflection.MethodInfo
        + public virtual System.Delegate CreateDelegate(Type delegateType)
        + public virtual System.Delegate CreateDelegate(Type delegateType,Object target)
    public class System.Reflection.EventInfo
        + public virtual System.Reflection.MethodInfo get_AddMethod()
        + public virtual System.Reflection.MethodInfo get_RemoveMethod()
        + public virtual System.Reflection.MethodInfo get_RaiseMethod()
    public class System.Reflection.PropertyInfo
        + public object GetValue(Object obj)
        + public void SetValue(Object obj,Object value)
        + public virtual System.Reflection.MethodInfo get_GetMethod()
        + public virtual System.Reflection.MethodInfo get_SetMethod()
    public class System.Reflection.ParameterInfo
        + public virtual bool get_HasDefaultValue()
        + public virtual IEnumerable<CustomAttributeData> get_CustomAttributes()
    public class System.Runtime.Serialization.SerializationInfo
        + public void .ctor(Type type,IFormatterConverter converter,Boolean requireSameTokenInPartialTrust)
    public class System.Globalization.Calendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Globalization.CompareInfo
        + public System.Globalization.SortVersion get_Version()
    public class System.Globalization.CultureInfo
        + public static System.Globalization.CultureInfo get_DefaultThreadCurrentCulture()
        + public static void set_DefaultThreadCurrentCulture(CultureInfo value)
        + public static System.Globalization.CultureInfo get_DefaultThreadCurrentUICulture()
        + public static void set_DefaultThreadCurrentUICulture(CultureInfo value)
    public class System.Globalization.GregorianCalendar
        - public virtual int GetWeekOfYear(DateTime time,CalendarWeekRule rule,DayOfWeek firstDayOfWeek)
    public class System.Globalization.HijriCalendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Globalization.UmAlQuraCalendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Globalization.ChineseLunisolarCalendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Globalization.JapaneseLunisolarCalendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Globalization.KoreanLunisolarCalendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Globalization.TaiwanLunisolarCalendar
        + protected virtual int get_DaysInYearBeforeMinSupportedYear()
    public class System.Security.Policy.ApplicationTrust
        + public virtual System.Security.Policy.EvidenceBase Clone()
    public class System.Security.Principal.GenericIdentity
        Base type changed: System.Object -> System.Security.Claims.ClaimsIdentity
        - interface: System.Security.Principal.IIdentity
        + public virtual System.Security.Claims.ClaimsIdentity Clone()
        + public virtual IEnumerable<Claim> get_Claims()
        + protected void .ctor(GenericIdentity identity)
    public class System.Security.Principal.GenericPrincipal
        Base type changed: System.Object -> System.Security.Claims.ClaimsPrincipal
        - interface: System.Security.Principal.IPrincipal
    public class System.Security.Principal.WindowsIdentity
        Base type changed: System.Object -> System.Security.Claims.ClaimsIdentity
        - interface: System.Security.Principal.IIdentity
        + public const string DefaultIssuer - Value: AD AUTHORITY
        + public virtual System.Security.Claims.ClaimsIdentity Clone()
        + public virtual IEnumerable<Claim> get_UserClaims()
        + public virtual IEnumerable<Claim> get_DeviceClaims()
        + public virtual IEnumerable<Claim> get_Claims()
        + protected void .ctor(WindowsIdentity identity)
    public class System.Security.Principal.WindowsPrincipal
        Base type changed: System.Object -> System.Security.Claims.ClaimsPrincipal
        - interface: System.Security.Principal.IPrincipal
        + public virtual IEnumerable<Claim> get_UserClaims()
        + public virtual IEnumerable<Claim> get_DeviceClaims()
    public enum System.Runtime.InteropServices.ComInterfaceType
        + public const System.Runtime.InteropServices.ComInterfaceType InterfaceIsIInspectable - Value: 3
    public enum System.Runtime.InteropServices.UnmanagedType
        + public const System.Runtime.InteropServices.UnmanagedType IInspectable - Value: 46
        + public const System.Runtime.InteropServices.UnmanagedType HString - Value: 47
    public class System.Runtime.InteropServices.Marshal
        + public static System.Type GetTypeFromCLSID(Guid clsid)
    public enum System.Runtime.InteropServices.TypeLibImporterFlags
        + public const System.Runtime.InteropServices.TypeLibImporterFlags ImportAsArm - Value: 16384
    public class System.IO.Stream
        + public System.Threading.Tasks.Task CopyToAsync(Stream destination)
        + public System.Threading.Tasks.Task CopyToAsync(Stream destination,Int32 bufferSize)
        + public virtual System.Threading.Tasks.Task CopyToAsync(Stream destination,Int32 bufferSize,CancellationToken cancellationToken)
        + public System.Threading.Tasks.Task FlushAsync()
        + public virtual System.Threading.Tasks.Task FlushAsync(CancellationToken cancellationToken)
        + public Task<int> ReadAsync(Byte[] buffer,Int32 offset,Int32 count)
        + public virtual Task<int> ReadAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        + public System.Threading.Tasks.Task WriteAsync(Byte[] buffer,Int32 offset,Int32 count)
        + public virtual System.Threading.Tasks.Task WriteAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
    public class System.IO.BinaryReader
        + public void .ctor(Stream input,Encoding encoding,Boolean leaveOpen)
    public class System.IO.BinaryWriter
        + public void .ctor(Stream output,Encoding encoding,Boolean leaveOpen)
    public class System.IO.BufferedStream
        + public virtual System.Threading.Tasks.Task FlushAsync(CancellationToken cancellationToken)
        + public virtual Task<int> ReadAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        + public virtual System.Threading.Tasks.Task WriteAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
    public class System.IO.FileStream
        + public virtual Task<int> ReadAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        + public virtual System.Threading.Tasks.Task WriteAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        + public virtual System.Threading.Tasks.Task FlushAsync(CancellationToken cancellationToken)
    public class System.IO.MemoryStream
        + public virtual System.Threading.Tasks.Task FlushAsync(CancellationToken cancellationToken)
        + public virtual Task<int> ReadAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        + public virtual System.Threading.Tasks.Task CopyToAsync(Stream destination,Int32 bufferSize,CancellationToken cancellationToken)
        + public virtual System.Threading.Tasks.Task WriteAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        - protected virtual void ObjectInvariant()
    public class System.IO.TextReader
        + public virtual Task<string> ReadLineAsync()
        + public virtual Task<string> ReadToEndAsync()
        + public virtual Task<int> ReadAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual Task<int> ReadBlockAsync(Char[] buffer,Int32 index,Int32 count)
    public class System.IO.StreamReader
        + public virtual int ReadBlock(out Char[] buffer,Int32 index,Int32 count)
        + public virtual Task<string> ReadLineAsync()
        + public virtual Task<string> ReadToEndAsync()
        + public virtual Task<int> ReadAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual Task<int> ReadBlockAsync(Char[] buffer,Int32 index,Int32 count)
        + public void .ctor(Stream stream,Encoding encoding,Boolean detectEncodingFromByteOrderMarks,Int32 bufferSize,Boolean leaveOpen)
    public class System.IO.TextWriter
        + public virtual System.Threading.Tasks.Task WriteAsync(Char value)
        + public virtual System.Threading.Tasks.Task WriteAsync(String value)
        + public System.Threading.Tasks.Task WriteAsync(Char[] buffer)
        + public virtual System.Threading.Tasks.Task WriteAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(Char value)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(String value)
        + public System.Threading.Tasks.Task WriteLineAsync(Char[] buffer)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual System.Threading.Tasks.Task WriteLineAsync()
        + public virtual System.Threading.Tasks.Task FlushAsync()
    public class System.IO.StreamWriter
        + public virtual System.Threading.Tasks.Task WriteAsync(Char value)
        + public virtual System.Threading.Tasks.Task WriteAsync(String value)
        + public virtual System.Threading.Tasks.Task WriteAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual System.Threading.Tasks.Task WriteLineAsync()
        + public virtual System.Threading.Tasks.Task WriteLineAsync(Char value)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(String value)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual System.Threading.Tasks.Task FlushAsync()
        + public void .ctor(Stream stream,Encoding encoding,Int32 bufferSize,Boolean leaveOpen)
    public class System.IO.StringReader
        + public virtual Task<string> ReadLineAsync()
        + public virtual Task<string> ReadToEndAsync()
        + public virtual Task<int> ReadBlockAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual Task<int> ReadAsync(Char[] buffer,Int32 index,Int32 count)
    public class System.IO.StringWriter
        + public virtual System.Threading.Tasks.Task WriteAsync(Char value)
        + public virtual System.Threading.Tasks.Task WriteAsync(String value)
        + public virtual System.Threading.Tasks.Task WriteAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(Char value)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(String value)
        + public virtual System.Threading.Tasks.Task WriteLineAsync(Char[] buffer,Int32 index,Int32 count)
        + public virtual System.Threading.Tasks.Task FlushAsync()
    public enum System.Runtime.CompilerServices.MethodImplOptions
        + public const System.Runtime.CompilerServices.MethodImplOptions AggressiveInlining - Value: 256
    public enum System.Runtime.GCLatencyMode
        + public const System.Runtime.GCLatencyMode SustainedLowLatency - Value: 3
    public class System.IO.IsolatedStorage.IsolatedStorageFileStream
        + public virtual void Lock(Int64 position,Int64 length)
        + public virtual void Unlock(Int64 position,Int64 length)
    public class System.Reflection.Emit.AssemblyBuilder
        + public static System.Reflection.Emit.AssemblyBuilder DefineDynamicAssembly(AssemblyName name,AssemblyBuilderAccess access)
        + public static System.Reflection.Emit.AssemblyBuilder DefineDynamicAssembly(AssemblyName name,AssemblyBuilderAccess access,IEnumerable<CustomAttributeBuilder> assemblyAttributes)
    public class System.Reflection.Emit.ConstructorBuilder
        + public void SetMethodBody(Byte[] il,Int32 maxStack,Byte[] localSignature,IEnumerable<ExceptionHandler> exceptionHandlers,IEnumerable<int> tokenFixups)
    public class System.Reflection.Emit.DynamicMethod
        + public virtual System.Delegate CreateDelegate(Type delegateType)
        + public virtual System.Delegate CreateDelegate(Type delegateType,Object target)
        - public System.Delegate CreateDelegate(Type delegateType)
        - public System.Delegate CreateDelegate(Type delegateType,Object target)
    public class System.Reflection.Emit.MethodBuilder
        + public void SetMethodBody(Byte[] il,Int32 maxStack,Byte[] localSignature,IEnumerable<ExceptionHandler> exceptionHandlers,IEnumerable<int> tokenFixups)
    public class System.Reflection.Emit.ModuleBuilder
        + public System.Reflection.Emit.MethodToken GetConstructorToken(ConstructorInfo constructor,IEnumerable<Type> optionalParameterTypes)
        + public System.Reflection.Emit.MethodToken GetMethodToken(MethodInfo method,IEnumerable<Type> optionalParameterTypes)
    public class System.Reflection.Emit.TypeBuilder
        Base type changed: System.Type -> System.Reflection.TypeInfo
        + public virtual bool IsAssignableFrom(TypeInfo typeInfo)
        + public virtual bool get_IsConstructedGenericType()
        + public System.Reflection.Emit.TypeBuilder DefineNestedType(String name,TypeAttributes attr,Type parent,PackingSize packSize,Int32 typeSize)
        + public System.Reflection.TypeInfo CreateTypeInfo()
    public class System.Reflection.Emit.GenericTypeParameterBuilder
        Base type changed: System.Type -> System.Reflection.TypeInfo
        + public virtual bool IsAssignableFrom(TypeInfo typeInfo)
        + public virtual bool get_IsConstructedGenericType()
        + public virtual System.Reflection.GenericParameterAttributes get_GenericParameterAttributes()
    public class System.Reflection.Emit.EnumBuilder
        Base type changed: System.Type -> System.Reflection.TypeInfo
        + public virtual bool IsAssignableFrom(TypeInfo typeInfo)
        + public System.Reflection.TypeInfo CreateTypeInfo()
        + public virtual bool get_IsConstructedGenericType()
    public enum System.Configuration.Assemblies.AssemblyHashAlgorithm
        + public const System.Configuration.Assemblies.AssemblyHashAlgorithm SHA256 - Value: 32780
        + public const System.Configuration.Assemblies.AssemblyHashAlgorithm SHA384 - Value: 32781
        + public const System.Configuration.Assemblies.AssemblyHashAlgorithm SHA512 - Value: 32782
    public class System.Security.Cryptography.CryptoStream
        + public virtual System.Threading.Tasks.Task FlushAsync(CancellationToken cancellationToken)
        + public virtual Task<int> ReadAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)
        + public virtual System.Threading.Tasks.Task WriteAsync(Byte[] buffer,Int32 offset,Int32 count,CancellationToken cancellationToken)

 

As you can see the changes here are mainly related to

  • Better support for ETW (Event Tracing for Windows)
  • Many added variants of existing APIs to allow async operations
  • Reflection can be extended now

A feature oriented overview of the changes in .NET 4.5 can be found here.

 

The CLR of .NET 4.5 has also some changes which relate mainly to GC and PGO. Sasha has put up a nice post covering more details. Finally you can do a full GC in the background without interrupting the application as often as it was previously the case. PGO (Profile guided optimization) allows you to add metadata to your assembly which is used by NGen to put the code which is run during the startup of your application into the same or adjacent pages to improve cold startup times considerably. The basic idea is that the hard disc needs to do less disc seeks while your program does start because the code can be read sequentially from disc. MS did this already since .NET 3.5 SP 1 but now you can do this as well. I am sure this very clever approach has also helped a lot to improve the startup times of Visual Studio.

posted on Thursday, March 1, 2012 10:45 AM