6

I have a batch class that converts thousands of Visualforce pages to PDFs and stores the PDF files into a folder (in documents). The batch seems to work fine, but the process will take hours to complete (8 to 9 hours).

My question is: what is the impact of this on the performance of my Salesforce instance? Does this affect day to day experience in Salesforce?

Thanks.

2 Answers 2

6

The batch apex is complete asynchronous process and it will execute in its own thread and hence it will not impact any data flow of your salesforce other process unless your other process depend on this batch process.

2

I would say that having a 9-hour job fire on a regular basis (lets say weekly vs. quarterly) sounds pretty dangerous from a systems-integrity standpoint.

Have you reviewed your PDF-generating pipeline to ensure there isn't an obvious bottleneck?

Are you using a solution like http://www.batchpdf.com/ to render VF to PDF in literal Salesforce batches?

Similarly, I had 2000-3000 PDF's rendering in less than 2 hours, not that that tells you much. They were emailed instead of saved though, so the write might be the bottleneck.

3
  • We need to generate around 15000 PDFs once a month. We will be using an external tool like Talend to retrieve those PDF files and store them in external FTP server. Obviously, we would purge the files once they are uploaded to external system. Oct 20, 2015 at 6:14
  • Sure. My question is HOW are you rendering your VF pages to PDF? If you review this post on Idea Exchange, you'll see that the ability to render VF to PDF in batch apex wasn't added until Winter 2016 (allegedly, I haven't tried it): success.salesforce.com/ideaview?id=08730000000Jm0GAAS Are you using this solution, BatchPDF off of the App Exchange, a REST-based callout hack, or some other solution. I suspect that either the render from VF to PDF or the save of the PDF to Documents is massively bottlenecking your process.
    – DavidWaugh
    Oct 20, 2015 at 17:50
  • I'm using the getContent() Apex method inside the batch. Since my API version is 35 (Winter16), this works fine. I'm having other problems though, especially with the heap size (I'm getting exceptions). But I'm still investigating. Oct 21, 2015 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .