PcxView.dll 2.0.41.2 is more slower that previous releases?

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Stemonte »

Hi,
I have noted that PcxView.dll 2.0.41.2 is more slower that previous releases. My Delphi PDFscrollbox is slooooow; If I change the dll with a previous release, all work as aspected. Have you noted this?
(The activex release seems always faster that dll).
Can I modify anything or I must wait for an update?
Thanks in advance,
Good Job.
Stefano Monterisi
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Lzcat - Tracker Supp »

Does this happen on all pdf files, or with some of them? Have tried several files and cannot confirm significant changes.
Can you supply sample file and sample project (if it is not one of ours)?
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Stemonte »

Hi,
I forget to mention that the previous release that I have used is the old 2.0.0.36; I have update directly to 2.0.41.2 and the speed difference is rilevant;
Thanks,
Stefano Monterisi
Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Stemonte »

Hi Victor,
thanks for the help;
I have tested your Delphi PDFScrollbox demo, changing only the dll; with 2.0.41.2 all pdf scrolling is slower; the problem, I think, is on rendering images; my pdf have a lot of images and the sloowing effect is really visible.
If you want, I can send you pdfs (several megabytes)...or link to them.
Thanks,
Stefano
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Lzcat - Tracker Supp »

You mean PXCViewDelphi.exe? If yes - it has a problem with drawing. It render whoule wisible rect for each redraw, even you scroll per one line. Try use pxcview36_sample_app.exe (C++ sample), it has better redrawing mechanism. Determinig rendering speed difference using eyes is not so accurate (you may not see difference between 5 and 10 milliseconds, but see it between 15 and 17 milliseconsds), so it is hard to say is difference so critical or not (for most pdf files is not, otherwise we will be blamed :)). Some perfomance degradation for images is possible - there was alot of fixes since build 36, but I don't think that it is dramatic or even significant. If you have file where difference is more 10-15% - please provide it to us.
Anyway rendering PDF is time consuming operation (some pages may render several secons even on modern PC), so doing this for each window paint is not good idea. For example Viewer use caching and page rendering is moved to separate thread(s), Adobe also use caching (but render pages in main thread). If you need view pdf ifles like in Viewer you may better use ActiveX (or take care about caching - for faster drawing second time, and rendering in separate thread - to avoid freezes when drawing some large pages).
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Stemonte »

Hi Victor,
ok;
But difference is noticeable on different release of dll, because the PDFScrollbox is always the same. On show of first page, and scrolling page with the scrollbar, the perception difference is rilevant. I love the PDFScrollbox performance with older release.
I want to use dll for direct control of PDF printing; if the problem is still present I can use the dll for direct/silent printing and the activex for viewing.......but the performance of older dll is good for use only the dll. :-) and I don't have to manage register/unregister of activex to customers :-) the perfect pdf viewer in 1 dll !!!
Please, give me an email; I send you a pdf that you can use for test.
Victor, please, help me on this: I need to print fast (the fastest possible) a lot of pdfs (1000-2000) at once;
I must generate the pdf on temp file and print it in sequence; The temp file must be always the same (i don't want to fill gigabytes of temp data on customer PC) so I must use one file; How I can test if the file is already and completely in print spool, so I can delete it for generate the next one? How I can known (if possible) that the file can be deleted because already processed for the printer?
Thanks in advance!
Good Job,
(sorry for my english)
Stefano Monterisi
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Ivan - Tracker Software »

You can send file on this email: Ivan@tracker-software.com
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Lzcat - Tracker Supp »

For printing it is recommended use different rendering mechanism - vector (see Flags parameter in PXV_CommonRenderParameters structure, pxvrpf_UseVectorRenderer flags). In most cases this will produce better results and perform faster. Build 36 is not so good with this rendering mechanism, so anyway you will need to use one of the latest.
About your file - I cannot see visual difference in performance, however automated testing found that for this file build 41.2 is about 1.5 times slower that build 36. Will investigate and see what can be done to improve performance.
To make sequential printing you will need do following:

Code: Select all

for each file
{
 1. Create temp file/memory block/IStream with current pdf
 2. Create PXVDocument using corresponding function
 3. Prepare and begin printing
 4. for each page
    {
      4.1 Get page dimention, orientation, etc
      4.2 Aquire page DC from printer
      4.3 Print page using PXCV_DrawPageToDC
      4.4 End page
      4.5 (Stringly recommended) call PXCV_ReleasePageCachedData to free page data (and some memory!)
    }
 5. Finish printer document
 6. Destroy PXVDocument
 7. Delete temp file/free memory/destroy IStream
}
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Stemonte »

Hi Victor,

>>>>Will investigate and see what can be done to improve performance.

Ok, I'm happy if you investigate and resolve; So I can use latest releases with the best performance possible. (Many customers have old and poor PC.....and the difference is really visible!).

>>>5. Finish printer document
>>>6. Destroy PXVDocument

Thanks Victor, but ....the print process is in the same thread? Because I think that the document can be destoyed before the printing process (to the spool) is completely doned, or not?

Thanks for help and good job :-)

Stefano Monterisi
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Ivan - Tracker Software »

PXCV_DrawPageToDC is blocking function and when it is finished, you can release document.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Lzcat - Tracker Supp »

Returning to performance difference - we found a problem, and it is partially fixed into build 41.3 (will be avail on site very soon). Now performance is much better, but some PDF files may look not so good (they must contain specific bezier curves, which may look as polyline instead of smooth curve). Complete solution will be avail with one ot the future builds, including some additional optimizations.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by Stemonte »

Hi Victor,
PXCV_DrawPageToDC works very well in my quick tests....now I can print a lot of document sequentially.
Thank you!
For the performance question, all optimizations are welcome :-)
Thanks for the help;
You have the best Pdf solution in the market...:-)
Good Job,
Stefano Monterisi
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: PcxView.dll 2.0.41.2 is more slower that previous releases?

Post by John - Tracker Supp »

Thanks Stefano - much appreciated :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com