1

I have an application which uses a WPF canvas to display very high resolution images. I noticed that when the same image was being displayed on my local computer, there was no problem and the application's memory was about 5GB on the task manager. But when I used remote desktop, the same application, displaying the same image was occupying around 8GB in the Task Manager.

I read about WPF using Hardware acceleration if available, but switching to Software Rendering in certain cases. One of the cases being over Remote Desktop. http://blogs.msdn.com/b/jgoldb/archive/2010/06/22/software-rendering-usage-in-wpf.aspx

Now my question is, although I understand that the CPU is now doing all the calculations for rendering in remote desktop, why is there such a huge difference between hardware rendering and software rendering? Any help or insight would be truly appreciated.

Kaushik
  • 429
  • 1
  • 7
  • 19
  • 1
    I think you may find this topic useful for you http://stackoverflow.com/questions/1005497/improving-wpf-application-speed-over-remote-desktop – Raffaeu Aug 04 '14 at 11:09
  • 1
    I'm not 100% sure but I think the problem might be that your image is now decompressed into memory using the CPU vs. the GPU doing all this stuff ... btw: 5GB Desktop app ...wow – Random Dev Aug 04 '14 at 11:18
  • Thanks for the link. I understand that during remote desktop session, the WPF uses software rendering which decreases the performance. I would like to knwo why the software rasterization is so memory intensive. I can understand it being performance intensive because the CPU is used, but why memory intensive? – Kaushik Aug 04 '14 at 11:18
  • 1
    @Kaushik Well, because you're having a high resolution image in memory? And all those intermediate buffers etc. that would usually be stored in video memory? A 3 GiB difference is still fishy, but then again, so is a 5 GiB desktop application :D Partitioning the data a bit might be a better solution, why do you need it all in memory at once? – Luaan Aug 04 '14 at 11:20
  • @Luaan Yeah the size of one Image itself is around 1.4GB. It being in video memory versus the main memory makes sense. – Kaushik Aug 04 '14 at 11:22

1 Answers1

1

During Software Rendering, the CPU and main memory are responsible for all the rendering operations. So all the temporary buffers are held in the main memory and the rendering operations are caluculated by the CPU which results in a decrease in performance and an increase in memory usage.

During hardware rendering all this would have been taken care by the GPU and video memory.

Note that in some cases, hardware rendering may be slower than software rendering. Refer to the link posted in the question.

Kaushik
  • 429
  • 1
  • 7
  • 19