Thanks to this community, I have created an amazing form that collects lots of data with repeating sub-forms and calculations. However, during testing we have come to the realization that the more information the user enters into the form, the slower it becomes. Its to the point that we cant do much but watch the little clock icon in Acrobat. I have placed a link to the folder that contains a sample filled out form along with the original LiveCycle Designer PDF file. If anyone has a solution that would be amazing. Its almost like its trying to calculate the fields or do something every time I move the mouse.
https://drive.google.com/drive/folders/19bcngsB6s8nNhWd5fzmc-WP6j-vn90HP?usp=sharing
Solved! Go to Solution.
Views
Replies
Total Likes
I had removed the For loops from the scripts of hourlyRateCap, adjustedRate, hourlyRate fields, which was causing the slowness issue. If you want to further optimize the performance, then you may follow the suggestions below:
1. Add a button at the bottom of the table to adjust the values.
2. Move the scripts(to adjust the values) from the exit/change events of the fields to the click event of this button.
3. Fill out all the data in the table, without executing any scripts while filling up the data.
4. Once all data is filled up, click on the button(added in step1), which will run the script finally and only once, on the click of that button.
Thank you for letting me know. I'll do that.
I would like to ask one quick question. When I look in the Acrobat community regarding a similar issue but with a form created in Acrobat instead of Designer, they are saying its because the form tries to recalculate every field as you add data. This makes sense because thats what it seems to be doing. However since my calculations are made in Designer, wouldn't this be something we have to fix in Designer?
You have added the calculation scripts via Designer, but the script is actually being executed by Acrobat plugin when you render the form as PDF in Designer. Also, you would need to optimize your script, as Acrobat can only execute the given scripts in the PDF.
@Mayank_Gandhi Thank you for your reply! I appreciate your idea and I'm happy to test it as a static form if I'm troubleshooting to find an issue to fix so it can run as dynamic. But if you are saying that I need to change it to a static form permanently, this is not an acceptable solution (if I have to make these forms run as static, I might as well go back to Word and Acrobat to build). I need this form to be dynamic for our users. If I'm troubleshooting, what am I looking for?
Thank you,
Emilee
@Mayank_Tiwari The Acrobat community has referred me back to this forum. They are saying that its not on the Acrobat side, its in the scripting. I'm hoping that someone has an idea that will help with the performance of this particular form. I have unmarked the acceptable solution in case I can get more ideas from the community.
As I stated earlier, you need to optimize your script in the first place. Can you please log a Support case for this, as this is a performance issue and requires deeper investigation. Thanks!
Ok. Thanks. Seems like there is nothing we can do.
I wasn't sure what you meant by optimizing my script so I looked it up and made sure everything was set they way the instructions suggested. If you have a preferred link that shows how to optimize script, please share if you don't mind. I would like to double check that I have done everything I can. I wish I could get the script to run only if there is an actual typed change but it seems to run every time I move my mouse which bogs it down. The problem still persists so I will try to log a support case.
Please share how you optimized the script. This did help a little. However, now the form gets slow about page 8 instead of page 3 when adding values. Is there no way to fix the JS to only execute if there is a global data value change (IDOT USE ONLY field and Hourly Rate Cap field) instead of constantly running or the user needing to click on hundreds of fields to manually execute? I cant even put in a support ticket because our IT staff has to do that for me so I'm trying desperately to fix this without having to explain my issue to them. Again, thank you for your time. I really appreciate it!
I had removed the For loops from the scripts of hourlyRateCap, adjustedRate, hourlyRate fields, which was causing the slowness issue. If you want to further optimize the performance, then you may follow the suggestions below:
1. Add a button at the bottom of the table to adjust the values.
2. Move the scripts(to adjust the values) from the exit/change events of the fields to the click event of this button.
3. Fill out all the data in the table, without executing any scripts while filling up the data.
4. Once all data is filled up, click on the button(added in step1), which will run the script finally and only once, on the click of that button.
@Mayank_Tiwari to the rescue! This works! Plus it gives me an alternative for the form owner to choose which way they want to proceed. Thank you so much for your patience and walking me through this!
Just in case this can help anyone, below is the link to the form that we fixed by utilizing a click event on a button to speed up this forms functionality as opposed to running script constantly.
https://drive.google.com/drive/folders/19bcngsB6s8nNhWd5fzmc-WP6j-vn90HP?usp=sharing
Views
Replies
Total Likes