I am creating PDF files using FME and am experiencing a serious performance issue (the process is very slow).
I have a PDF template that I read and merge with my data so that each ID gets its own template. I use specific X,Y coordinates to write text at the correct positions in the PDF, and then I use the ID in the PDF writer to generate one PDF document per ID that includes both the data and the template.
The output is correct and matches my expectations; however, exporting all records with the template takes a very long time.
I was thinking to use the PDF Page Transformer, but rebuilding the pages also takes a significant amount of time.
Is there any way to improve performance and make my current solution faster without completely rebuilding the workflow?
thanks in advance
FME 2021
Best answer by redgeographics
Without seeing the workspace or the results I can only give you general tips and advice.
So first of all: sometimes it just is what it is ¯\_(ツ)_/¯
That may not sound very helpful, but if it’s a fairly complex PDF and big workspace, 1 minute does not sound completely out of the ordinary.
Having said that, there’s some things you can consider:
If you have FME Server and can use multiple engines there, split the work across those engines. You’ll get your result faster.
If you are able to (i.e. if you have valid maintenance), upgrade FME to the latest version and upgrade the transformers in your workspace, as well as the readers and writers. This is not guaranteed to give you a performance boost, but given the fact you’re currently on a version that’s getting close to 5 years old, my bet is that it will make a difference.
Throw better hardware at it. Take a look at your current machine’s specs and if you have a chance of running it on better hardware, do it. If you’re reading from or writing to a network drive, try and change that to a local hard drive, SSD if possible. Lots of ram and a fast processor can make a difference too.
It’ll be an investment, but if it works… consider using one of the top-end Flow Hosted virtual machines. I’ve done that once for a big job that I wasn’t able to do on my own hardware
Regarding your comment “they want to export all PDFs at once”, I think in the end, the end result (i.e. 5000 PDFs) is what counts, not how you got there.
Can you give us some numbers? How many PDF’s, how much time is spent? Is it a particulary complex template that you’re using?
If it is a complex template and you’re processing a lot of PDF’s it may cause performance issues because the template is duplicated for each feature. Have you considered running them one at a time with a WorkspaceRunner?
Without seeing the workspace or the results I can only give you general tips and advice.
So first of all: sometimes it just is what it is ¯\_(ツ)_/¯
That may not sound very helpful, but if it’s a fairly complex PDF and big workspace, 1 minute does not sound completely out of the ordinary.
Having said that, there’s some things you can consider:
If you have FME Server and can use multiple engines there, split the work across those engines. You’ll get your result faster.
If you are able to (i.e. if you have valid maintenance), upgrade FME to the latest version and upgrade the transformers in your workspace, as well as the readers and writers. This is not guaranteed to give you a performance boost, but given the fact you’re currently on a version that’s getting close to 5 years old, my bet is that it will make a difference.
Throw better hardware at it. Take a look at your current machine’s specs and if you have a chance of running it on better hardware, do it. If you’re reading from or writing to a network drive, try and change that to a local hard drive, SSD if possible. Lots of ram and a fast processor can make a difference too.
It’ll be an investment, but if it works… consider using one of the top-end Flow Hosted virtual machines. I’ve done that once for a big job that I wasn’t able to do on my own hardware
Regarding your comment “they want to export all PDFs at once”, I think in the end, the end result (i.e. 5000 PDFs) is what counts, not how you got there.