It's true I have some external assemblies to resolve so that intellisense can work. However I have few bugs (if I use the repository it works the first time but once the repository exists I have an exception thrown by an Actipro type on a specific assembly passed to AssemblyReferences : NotImplementedMemberException or something like this) and I am not sure yet about the cause so I will open a thread later about this specific case.
I tried to profile memory with .Net memory profiler but the results are not clear. The problem is that I have too many new instances between the two snapshots : the one without any SyntaxEditor open and the second with a SyntaxEditor displaying a small C# source code. As far as I can see its seems to be the Byte[] type witch is the more greedy with 6.10^6 bytes and 60 instances delta.
The largest new Byte[] instance is one of 6 122 558 bytes and is hold by the BackGround property of a AvalonAdapter type instance which seems to be the parent of the SyntaxEditor and of an ElementHost instance also. Here is the call stack :
System.IO.MemoryStream.set_Capacity( int )
System.IO.MemoryStream.EnsureCapacity( int )
System.IO.MemoryStream.SetLength( long )
[Managed to native transition]
System.Drawing.SafeNativeMethods.Gdip.GdipSaveImageToStream( HandleRef,IStream,ref Guid,HandleRef )
System.Drawing.Image.Save( Stream,ImageCodecInfo,EncoderParameters )
System.Windows.Forms.Integration.Convert.ToSystemWindowsMediaImagingBitmapImage( Image )
System.Windows.Forms.Integration.ElementHostPropertyMap.UpdateBackgroundImage( ElementHost )
System.Windows.Forms.Integration.PropertyMap.RunTranslator( PropertyTranslator,object,string,object )
System.Windows.Forms.Integration.PropertyMap.OnPropertyChanged( object,string,object )
System.Windows.Forms.Control.UpdateBounds( int,int,int,int,int,int )
System.Windows.Forms.Control.UpdateBounds()
System.Windows.Forms.Control.WmWindowPosChanged( ref Message )
System.Windows.Forms.Control.WndProc( ref Message )
System.Windows.Forms.Integration.ElementHost.WndProc( ref Message )
System.Windows.Forms.NativeWindow.Callback( IntPtr,int,IntPtr,IntPtr )
[Native to managed transition]
[Managed to native transition]
System.Windows.Forms.SafeNativeMethods.SetWindowPos( HandleRef,HandleRef,int,int,int,int,int )
System.Windows.Forms.Control.SetBoundsCore( int,int,int,int,BoundsSpecified )
System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds( Rectangle,BoundsSpecified )
System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl( IArrangedElement,Rectangle,bool,ref Size,ref Rectangle )
System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls( IArrangedElement,bool )
System.Windows.Forms.Layout.DefaultLayout.xLayout( IArrangedElement,bool,ref Size )
System.Windows.Forms.Layout.DefaultLayout.LayoutCore( IArrangedElement,LayoutEventArgs )
[Truncated]
It seems that at least a part of the problem comes frome the interop... I will dig further.