PDF generation process optmisation -> is it possible ?

Hello all! 
I'm creating some PDF, using a Google Doc as template, from some bots.. 
I've noticed that, the time necessary to do this, is quite long: 

DroidTeo_0-1675158915076.png

Do you know if there is a way to optmize this kind of process? 

Thanks! 

 

Idea-> feature idea 

Solved Solved
1 8 361
1 ACCEPTED SOLUTION

I've contacted the support and... 
there is no solution 😞 

The explication that they gave me is that: 
1) the App will fetch all the data from the App to create the PDF. -> strange for me, why this? 
2) because of point 1, if there too many select this can have an impact 
3) too many <<if:this ....>> expression inside the template are not good either 

4) no details are not visible inside the perf analyzer and so, we cannot know exactly which component is consuming so much time.. 

😞 😞 😞 😞 

View solution in original post

8 REPLIES 8

Looking at the Performance analysis, it seems to reflect the complete time taken is 28 secs but only 8 secs to create and write the file.  Do you know where the other 20 seconds are being spent?

@WillowMobileSys no I have no idea..
I mean, I don't have any other elmento expand after for these 20 seconds.. There are only these 2 steps.

 

I've contacted the support and... 
there is no solution 😞 

The explication that they gave me is that: 
1) the App will fetch all the data from the App to create the PDF. -> strange for me, why this? 
2) because of point 1, if there too many select this can have an impact 
3) too many <<if:this ....>> expression inside the template are not good either 

4) no details are not visible inside the perf analyzer and so, we cannot know exactly which component is consuming so much time.. 

😞 😞 😞 😞 


@DroidTeo wrote:

he App will fetch all the data from the App to create the PDF. -> strange for me, why this? 


Expressions can be written inside the template to access ANY of the app data. 

Sure, AppSheet could optimize this by inspecting the template to see what data it actually needs and then "send" only that data.  But it would be complicated and prone to errors.  Probably not worth the effort to save a few seconds on something that is producing a document in a background process.

 

 

For me, it can be easily solved specifing which table you want to "pass" to the template, instead of using the entire DB as source. 
Only the data that belong to that table can used.. this can be improve a lot the things 


@DroidTeo wrote:

For me, it can be easily solved specifing which table you want to "pass" to the template, instead of using the entire DB as source


Nope, you shouldn't be limited to just one table when using reports, that would completely destroy the usefulness of reports.

A couple of seconds per report is not a problem unless you are trying to come up with some workflow where you want to access the report from inside the app and, for some reason, you expect it to be fast. I much prefer to force sync in those cases.

Is there a reason that 30 sec is problematic to you?

Also, have you tried with HTML templates? Just saying...

@SkrOYC I didn't say only one table.. my idea is to be able to specifies the tables that you need in your report.
If you can specify if you want to use only Table1 for a report -> this will increase a lot the perf.. 
If you need 4 tables for a report, you just need to specify these 4 tables inside the bot configuration etc.. 

This permits to avoid to use resource for data that are not necessary... 
Why should the app consider 10 tables, when I need to use only 1 or 2 or 3.. ? 

Yes, for me, 30 secs is to much.. 

Regarding the HTML templates, no.. I didn't tried.. and I would like to avoid for other reasons..
But, why not, if it is better.
Do you know if it is better in term of perf? Do you some kind of benchmark?

 


@DroidTeo wrote:

Do you some kind of benchmark?


I can't actually. I mean, you would need to make to templates, one with HTML + CSS and the other with GDocs/MSWord to be able to tell differences and I don't have that.

Common sense makes me think that it could save some time since GDocs/MSWord templates are converted into HTML+CSS before the data is applied, but this could be just 1-2 sec.

Top Labels in this Space