Silicon Valley Code Camp : October 5th and 6th 2013
Steve is an independent software consultant in Silicon Valley specializing in the Microsoft product stack having retired after a 40+ year career doing semiconductor industry, with side excursions in to medical image management. Over the years he has worked with a wide range of platforms from mainframes to PCs, many of which have gone to the great scrap yard in the sky.
Co-chair Baynet User Group's South Bay Chapter and Baynet Treasurer
Window Presentation Foundation (WPF) provides a powerful set of tools for rapidly developing sophisticated desktop user interfaces (UIs); however the power comes with an significant performance overhead.
In this session I will focus on what a developer can do beyond using a background thread to solve performance issues without totally abandoning WPF.
This presentation is based on work do for a project which need to include a real time display of status maps for water distribution system with up to 50,000 element in a WPF based user interface
The presentation will focus on three areas:
1. The WPF performance monitoring tools
2. Use of the lower overhead visual host based WPF display element including tradeoff and limitation
3. Integration of DirectX generated graphic elements into WPF displays
DirectX integration offers the high display performance and allows one to take full advantage of multi-core GPUs. For reasons that will be discussed during the presentation stock WPF application can only use GPUs in a single thread mode and therefore can not take full advantage of muti-core GPUs.
The DirectX integration approach was the only one, which could meet the demands of the water distribution application.
The implementation was based on the WindowsAPICodePackDirectX SDK, which is available from the MSDN archives http://archive.msdn.microsoft.com/WindowsAPICodePack
, the Surface Queue Helper also available from MSDN archives http://archive.msdn.microsoft.com/D3D9ExDXGISharedSurf
and a set of .NET wrappers for the Surface Queue Helper Library from a blog post by .
The approach was originally discussed in a blog post by rob relyea of Microsoft which appears to be lost in the MSDN archives. The January 2012 link to blog entry is broken.
I have corrected several bug in the original post and will be creating a Codeplex project with the libraries and a demo application project demonstrating the use of the libraries (not the water works apps which is proprietary code) for both 32 bit and 64 bit systems
Additional interfaces added in Windows 8 allow developers of Window 8 store application and Window 8 phone application to use DirectX without the need for the Surface Queue Library.
The VS2012 tooling for Window 8 however does not include C# wrapper for DirectX and the WindowsAPICodePackDirectX SDK does not offer support for Windows Store Apps or Window Phone 8 apps. There is however a Open Source Project SharpDX which can provide C# Direct Wrappers for Windows 8 Store Apps and Windows Phone 8 Apps.
Time permitting a discussion of using DirectX with Windows 8 Store Apps and Windows Phone 8 Apps written in C# will be include in the presentation.
The programmer free ride to ever increasing performance generated by ever increasing CPU clock speed has come to an end.
In the brave new world, which is emerging, programmer will need to take advantage for the ever-increasing number of cores on the coming generations of CPU chips if they want to improve the performance of their applications.
In the past creating programs, which took advantage of multi-core architectures, has been a very challenging task.
In recent years researchers at Intel and in academia have created C++ libraries, which greatly simplify the task for many common type of applications. Microsoft developer having observed these effort have incorporated many of the better ideas for these efforts into .Net 4.0 as the parallel task extension.
In this session the speaker will review the common pit falls associated this the classic multi-threaded approach to designing multi-core application and then demonstrate how the parallel task extension in .Net 4.0 allow C# programmers to avoid these problems while still taking full advantage of multi-core CPUs.
While the task parallel extension eliminate much of the pain associated with developing multi-core aware application, live is "not still all roses". The speaker will therefore also discuss limitations on the types of application, which can benefit from the use of the parallel task extensions in .Net 4.0 and a number of pit falls associated with its use.
The session will also include a discussion and demonstration of the tools for analyzing performance issue in multi-core application, which were added to the Visual Studio tool set in version 10.
Discussion of the .Net 4.5 enhancement to the Task Parallel Library and Multi Core Development tooling in VS2012 will be added to this year presentation.
The relationship between the Task Parallel Library and the new async/await programing construct will also be covered
The presentation will close with the discussion of the architecture for a application with uses parallel task execution and the Task Parallel Library in order to provide a real time display of simulated and measured result for complex real world systems