Performance(calculation speed) hit in long pdf form
Hello Guys,
Please get a few mins to read all.
I am creating a pdf version of loan and mortgage calculator originally created in excel. This calculator spans more than 1600 rows across 12 columns and out of which 1560 rows are used only for payment/amortization schedule. This part is actually causing problems. Excel sheet is having multi-level nested(to excel's limit) if else largely and some other simple calculations e.g PMT, MOD.
I have converted all excel formulas in livecycle javascript and are working fine but the pdf form calculation speed is far from that of excel. Even if we use the short term for loan e.g 3 or 4 years it take time while excel sheet is designed to calculated till 1560 total number of payments and takes no time to calculate all data.
I used repeatable subform feature and depending on the total number of payments rows are generated during runtime. I used this to keep document length optimum and escape from calculating unnecessary rows that are not required when loan term is small. But this failed even for small loan terms e.g 3 or 4 years.
I later did acrobat form in which all the 1560 rows with 12 columns created, dynamically set format of 18850 fields, converted javascript from livecycle to acrobat format and applied script under each of 18850 fields. But this also works slow because it calculates all 1560 rows*12 cols each time even if no data is there or not req to calculate. I am planning to put all the script under one field and using document level function and do repeat only required number of times through loop.
But I think I should test adobe writing speed if we forget all calculation for one sec. I find writing a null( "" ) into 18850 fields adobe took apx 1 min with no calculation done. While excel does this in 0.5 sec or less.
This means that even if an efficient code is written it would still work slow for longer loan terms.
Please advise what can be done or to what application or file format I should switch to.
Thanks for reading all.
Arvind
