You are not logged in. [Log In] Objectif Lune » Forums » PlanetPress Suite 7 » PlanetPress Workflow » Slow performance on generate PDF output Register User    Forum List            FAQ
 Topic Options
 #49654 - 10/08/14 11:30 PM Slow performance on generate PDF output Alex Liu OL Newbie Registered: 10/08/14 Posts: 9 Loc: Hong Kong The workflow take 1 mins to generate 1 PDF output. We need to generate 1500 pdf per request. It take more than one day to complete the process! How can we improve the performance?The pp7 file around 20mb because it have different backgroud image attached. The output PDF file is 1MB (4page). Please guide me how to enhance the pp7 file in any way.The PPW run on Xeon E5606, 8GB Ram Win 2008R2. Top
 #49655 - 10/09/14 03:10 AM Re: Slow performance on generate PDF output jim3108 OL Expert Registered: 04/19/10 Posts: 294 Loc: London, UK 20MB! What kind of quality background image do you need? Must it be this large?That's your starting point. Optimise the images for the background and thin out the PP7 to get it to run faster.What is the size of the compiled PTK file (pp7 compiled)? Top
 #49671 - 10/09/14 10:24 PM Re: Slow performance on generate PDF output Alex Liu OL Newbie Registered: 10/08/14 Posts: 9 Loc: Hong Kong BM005_01.ptk 206kbBM005_01.ps7 30629kbthe background image is only 700kb per file but I have more than 40 images. It base on data to select which image will be used.How can I design the document to run faster? Top
 #49677 - 10/10/14 03:13 AM Re: Slow performance on generate PDF output Dal OL Guru Registered: 08/29/08 Posts: 114 Loc: UK Instead of all the images residing in the template like this, use dynamic images.Store the images in a folder on the server then on your picture object, you would define the required image as:Code:='c:\\path\\to\\my\\image\\' + &imagefilenameWhere &imagefilename is a global variable you set to the required file based on the data at runtime.I never (or hardly ever) embed images in templates these days. I'd rather keep branding/signatures/etc on the file system so clients can update them without ever needing to touch the template. Top
 #49678 - 10/10/14 06:01 AM Re: Slow performance on generate PDF output Alex Liu OL Newbie Registered: 10/08/14 Posts: 9 Loc: Hong Kong The original code like this IF((&AccountNumber='L005A')) MoveTo(1.2,1.5) showbitmap(&AccountNumber+'_backpage',&document.picturecolorres,&boxWeight+2.15,&boxWeight+2.15) MoveTo(2.2,2.95) show('"'+XmlGet('/XXONTBOOKLIST[1]/LIST_G_HEADER[1]/G_HEADER[1]/BARCODE_HSBC[1]')+'"')endif()Change to IF((&AccountNumber='L005A')) MoveTo(1.2,1.5) showbitmap('c:\\path\\to\\my\\image\\' + &imagefilename,&document.picturecolorres,&boxWeight+2.15,&boxWeight+2.15) MoveTo(2.2,2.95) show('"'+XmlGet('/XXONTBOOKLIST[1]/LIST_G_HEADER[1]/G_HEADER[1]/BARCODE_HSBC[1]')+'"')endif() Top
 #49750 - 10/15/14 04:25 AM Re: Slow performance on generate PDF output [Re: Dal] Alex Liu OL Newbie Registered: 10/08/14 Posts: 9 Loc: Hong Kong Define the picture should look like this?Define(&filename,string,'C:\\L211A_backpage.jpg')crlf(2.125)gsave()passthrough('300 300 true &filename PrintJPEG')grestore() Top
 #50325 - 12/04/14 10:05 PM Re: Slow performance on generate PDF output Alex Liu OL Newbie Registered: 10/08/14 Posts: 9 Loc: Hong Kong After I change all the image into read from file system.the file size has been decrease. BM005_01.ptk 179 kbBM005_01.ps7 2407 kbBut we still facing the slow performance issue!!How can I improve the generate PDF speed?it take 30sec to generate 1 PDF at this moment. Totally I need to generate 35000 document within a month. Top
 #50326 - 12/05/14 09:12 AM Re: Slow performance on generate PDF output Raphael Lalonde Lefebvre OL Expert Registered: 10/14/05 Posts: 4953 Loc: Objectif Lune Montreal Hi Alex,Loading external images won't necessarily improve performances that much. You are still loading several external images, and in fact, since external images aren't cached in the way images in picture ressources are, it might actually make it worse in some cases.Here's some tips that could be useful:- In Workflow, avoid splitting on every records, and if you must split, make sure you split in larger chunks. No image caching will take place between each splits, so if you have picture ressources of 20 mb, and generate 35000 split files, it will reprocess 20 mb of images 35000 times!- Try maybe regenerating your images with lower resolution, use black white instead of color(an image that looks B&W might still have been saved as color, and will be bigger because of that), maybe use image formats that are smaller(for example, JPEG is usually smaller than PNG or BMP...)- I haven't seen your images, but if some of them are nothing but text with boxes and other form elements, then perhaps instead of using images, you could draw them in PlanetPress with boxes and text areas. It will take some time to do, but it will be much faster.In the end, however, there is no "magic" solution when dealing with large images. They will always take time to process, and it's impossible to get the same performance as a document with smaller or no images.Regards,Raphaël Lalonde Lefebvre Top
 #50501 - 12/25/14 08:30 PM Re: Slow performance on generate PDF output Alex Liu OL Newbie Registered: 10/08/14 Posts: 9 Loc: Hong Kong Dear Raphaël Lalonde Lefebvre,Thanks for your reply.First, Can I cached the image and how?Second, I already using Jpeg but with black white colour.Finally, the images is some graph plus excel table format, it isn't possible to re-draw it in PlanetPress.I know there is no magic, it's the only way to buy a better server? or buy one more license?Cheers,Alex Top