WPF high memory usage

Discussions about document viewing.
Post Reply
GlenThomas
Posts: 4
Joined: Thu Apr 19, 2012 5:30 pm

WPF high memory usage

Post by GlenThomas » Thu Apr 19, 2012 5:57 pm

I have tried using the GdPicture library with WPF using the Windows Forms host as you do in your sample projects. The memory usage is very high, especially in comparison to using the library with Windows Forms applications.

The high memory usage is going to cause big problems for me as users may be dealing with large TIFF files with big dimensions and pixel depths per page and large numbers of pages.

Is there any fix/workaround/plan to solve this issue?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: WPF high memory usage

Post by Loïc » Mon Apr 23, 2012 2:53 pm

Hello,

There is no reason to get more memory used in WPF application. I think you have a memory leak somewhere.
Please try to reproduce the issue in a simple standalone app (based on latest GdPicture.NET version) that you can send through https://www.gdpicture.com/support/getting-support-from-our-team for investigations.

Kind regards,

Loïc

GlenThomas
Posts: 4
Joined: Thu Apr 19, 2012 5:30 pm

Re: WPF high memory usage

Post by GlenThomas » Tue Apr 24, 2012 3:09 pm

I did reproduce the issue in a VERY simple standalone app (based on latest GdPicture.NET version). I have no memory leaks.
You will be able to very easily reproduce this issue with a basic winforms and WPF comparison. Try using your samples for a quick comparison.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: WPF high memory usage

Post by Loïc » Tue Apr 24, 2012 3:41 pm

I don't see any problem. Could you provide more explanations to reproduce the issue ?

GlenThomas
Posts: 4
Joined: Thu Apr 19, 2012 5:30 pm

Re: WPF high memory usage

Post by GlenThomas » Mon Apr 30, 2012 4:14 pm

Ok, I'm going to try and explain it as simply as I can.

GDPicture.NET has some sample applications. One is a WinForms viewer control. Another is a WPF application that also loads images to a window. The WPF application uses a WinForms host.

Open the same TIFF file in both of these applications and compare the memory allocation of each.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: WPF high memory usage

Post by Loïc » Mon Apr 30, 2012 5:37 pm

Open the same TIFF file in both of these applications and compare the memory allocation of each.
Done. Almost no difference in release mode with same framework version usage, displaying the same image in the same zoom level. One app is using 38 mb (winform) other one 40 mb(WPF). I suppose the WPF runtime library require more memory to display a simple form...

GlenThomas
Posts: 4
Joined: Thu Apr 19, 2012 5:30 pm

Re: WPF high memory usage

Post by GlenThomas » Tue May 01, 2012 6:27 pm

I'll make a screenshot for you...

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests