This is a migrated thread and some comments may be shown as answers.

Memory issues

7 Answers 141 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 22 Jun 2012, 10:34 PM
When I load a document, my sllauncher.exe goes from about 200,000k to 800,000k on a 2 page 400kb file.  If I try to load a large file it gives me a memory error when I go page to page.  Is this normal?  I get my pdf file from a webservice that streams the file like this:

       Uri surl = new Uri("http://myService/StreamFile.ashx?FileID=1");
       this.pdfViewer.DocumentSource = new PdfDocumentSource(surl);

7 Answers, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 25 Jun 2012, 02:12 PM
Hello Dan,

Do you encounter the same problem when are trying to open these files in our online demo? If so, we will appreciate it if you can send us a file to further investigate this issue attached to a support ticket.

Looking forward to your reply.

Greetings,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
danparker276
Top achievements
Rank 2
answered on 25 Jun 2012, 06:40 PM
Yeah, I was able to reproduce it on the demo.  It's only for certain pdf files though.  These are pdf files that were converted from TIFF using a 3rd party converter.  The bigger files that I used to get this problem have some confidential data, so I have a smaller file, but if you open it up about 5 consecutive times on the online demo, you can see the problem.  The memory grows every time I open the file.  Here is a link to the sample pdf that you can download:
http://xamlui.com/test2page.pdf 

0
Kammen
Telerik team
answered on 26 Jun 2012, 01:07 PM
Hello Dan,

Thank you for the cooperation. We will do our best to fix this problem.

We have updated your Telerik points in appreciation of your involvement.

Kind regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
danparker276
Top achievements
Rank 2
answered on 17 May 2013, 07:16 PM
I'm having the same issue with 2 other documents (do the same thing in your viewer)  CTTI 4 compression.  I can't really attach those files because of the information they contain.  Have you been getting more of these issues though.  I don't really think I can use this viewer for production use.  I can change the compression type if that helps.
0
Kammen
Telerik team
answered on 20 May 2013, 08:35 AM
Hello,

When a PDF document contains big images it is completely normal the memory consumption to be large. Note that RadPdfViewer requires an array of pixels in order to do some preprocessing of an image. This means that it cannot use the encoded data, but needs to decode it in order to add some corrections. Also, it will need a ready ImageSource instance in order to draw it when necessary. Basically, one large image consumes about 60mb which is why memory consumption is high. 

Moreover, Silverlight has its own issues when it comes to big images as well (Out of Memory exceptions are thrown sometimes, when the images are large).

We will continue trying to reduce the memory consumption but at this point there is not much we can do. 

Kind regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
danparker276
Top achievements
Rank 2
answered on 21 May 2013, 11:25 PM
Gaining some memory is ok, but it puts the CPU to 99% and jumps about 600mb on a 5 page document.  You fixed a similar problem before.  No big deal.  Telerik isn't an imaging software sdk company.  You don't advertise this as a perfect solution.  I'm using a web browers to display the PDFs now and it's working fine.  The only downside is that I have to compile the program for 32 bit because of the adobe plugin.  Also I'm actually using WPF for this, but still I'm having issues with certain files. 
0
Kammen
Telerik team
answered on 23 May 2013, 10:51 AM
Hi Dan,

Optimizing the performance and memory consumption is one of the top priority tasks for Q2 SP1. Hopefully we will find a better way to handle the big images.

Regards,
Kammen
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PDFViewer
Asked by
danparker276
Top achievements
Rank 2
Answers by
Kammen
Telerik team
danparker276
Top achievements
Rank 2
Share this question
or