Skip to content
luithefirst edited this page Mar 22, 2016 · 1 revision

This C# projects demonstrates unusual stalls when a BitmapSource is created as additional part for the discussion in the Microsoft Developers Forums: https://social.msdn.microsoft.com/Forums/en-US/9b0f152a-54fe-4b6b-8b17-e36cc4f79ef0/unusual-stalls-caused-by-bitmapsourcecreate?forum=wpf

The stalls starts when about 1GB of data is allocated using lots of small objects, creating a BitmapSource suddenly takes >1000ms. It has been tested on Windows 7 and 8.1 with the same result.

For some really strange reason an OpenFileDialog is also necessary to cause this issue. Without that dialog, BitmapSource.Create usually finishes in 0ms, but sometimes there are still outliers that take >1000ms.

Clone this wiki locally