NRajkumar / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

Slow JPEG2000 loading/rendering #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
 Render the attached file using Pdfium, ie FPDF_RenderPageBitmap. Observe it takes over ten seconds to render a single page.

What is the expected output? 
Should take one second or less.

Note that Chrome also uses Pdfium and renders it very quickly, so this issue 
may be somehow unique to me - but posting here in case it can be reproduced.

What version of the product are you using? On what operating system?
Using a copy of Pdfium I built myself, currently synced at version 
chromium/2391, both on linux and on android.

Please provide any additional information below.

Slowness in rendering attached pdf is due to slowness in opj_decode in 
libobenjpeg20, called by CJPX_Decoder::Init in fx_codec_jpx_opj.cpp

Original issue reported on code.google.com by ol...@google.com on 19 May 2015 at 4:52

Attachments:

GoogleCodeExporter commented 9 years ago
Can you attach the test code here so that we can check the difference between 
your test program and chrome? 

Original comment by sanqings...@gmail.com on 19 May 2015 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by jun_f...@foxitsoftware.com on 19 May 2015 at 5:00

GoogleCodeExporter commented 9 years ago
Not repoducing: Linux 64, PDFium rev 3b60890.

$ time out/Debug/pdfium_test ~/Downloads/Ruimte\ B8\ magazijn\ ETOS\ 
3-4-2015.pdf 
Rendering PDF file /usr/local/google/home/tsepez/Downloads/Ruimte B8 magazijn 
ETOS 3-4-2015.pdf.
Linearized path...
Rendered 1 pages.
Skipped 0 bad pages.

real    0m1.794s
user    0m1.713s
sys 0m0.083s

Original comment by tsepez@chromium.org on 19 May 2015 at 6:32

GoogleCodeExporter commented 9 years ago
It may be that FPDF_RenderPageBitmap is called in a wrong way like incorrect 
parameters. 

Original comment by jun_f...@foxitsoftware.com on 19 May 2015 at 6:36

GoogleCodeExporter commented 9 years ago
Disregard - something to do with the sandboxed environment I am running it in. 
This bug can be closed.

Original comment by ol...@google.com on 27 May 2015 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by thestig@chromium.org on 27 May 2015 at 5:49