Hello,
I’ve checked your form, my apologies, but I think it has been implemented in a very inefficient way.
For example, your form includes 465 fields, and 144 of them are calculated fields. Your form has enabled the dynamic evaluation of the equations, so, every time a field varies its value the plugin should check all the equations to determine those affected by this field and evaluate them. Furthermore, after evaluate the equations the plugin should check all the equations again to determine which of them were affected by the fields just calculated previously, and repeat the process until none field change its value.
Many of these calculated fields are used only as auxiliary fields, and their equations are simply the name of other fields.
Something similar occur with the dependencies. If a field is dependent and it is set as active, all the equations that depends of the activated fields must be evaluated repeating the process described previously.
Please, be sure you have not created an infinite loop with the dependencies. For example if the field A depend of the result of the equation associated to the field B, but directly or indirectly the field A affects the result of the field B, you would be creating an infinite loop.
The best solution would be optimize the fields and the equations in your form (including the dependencies), removing all the unnecessary fields and merging some of the equations.
An intermediary solution would be deactivate the dynamic evaluation of the equations: untick the “Eval dynamically the equations associated to the calculated fields” checkbox in the “Form Settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png), but in this case would be needed insert a button field in the form with the “Calculate” option ticked as the button’s type.
Best regards.
Thanks very much for the feedback. I took your advice and reduced the number of calculated fields. In order to do this I needed to create functions that would do the work of multiple fields. Unfortunately, even with far fewer calculated fields, the form is loading slower now (according to GTMetrix it takes 32 seconds to load, the original took 25 seconds which was already far too slow).
Here is the new version I created.
http://magicguides.com/dining-calculator-speed-test/
I also tried your second suggestion about turning off “eval dynamically” and adding a calculate button. Unfortunately this breaks the functionality of the dropdown fields which I need to work without clicking the calculate button.
Any other suggestions?
Hello,
I’ve checked your form again, and these are the stats:
Number of fields in the form: 788
Calculated fields: 163
Dependencies: 194 (some dependencies imply container fields, so, they affect to all fields into the container)
As I said previously, if the plugin should check with each action 163 equations and 194 dependencies (by the way, I’ve not checked if there are infinite loops between dependencies and equation), and for every equation evaluated (or dependency modified) the equations and dependecies should be checked again, there is no way your form can run faster if you don’t optimize it.
Another possibility, if you are using the Professional version of the plugin, it is activate the “Forms Cache” option in the settings page of the plugin, in whose case the form will be rendered when be pressed the preview button in the forms builder, and for the public website would be used the version of the form stored in cache.
Best regards.
Thanks again for your response. Unfortunately, I do not know how to optimize the form further. Are you available to do optimization services for a fee?
Hello @logancale,
I’ve tried to explain in my previous tickets that it is not a simple problem of optimization, my recommendation is re-implement the form, but thinking in create an optimized form.
I don’t know all your form’s details, however, I guess that a form with 788 fields, 163 equations and 194 dependencies won’t be very attractive for the users, and I doubt about the need for all these fields.
If you need a development service do not hesitate in contact me through my private website with a detailed description of your project:
https://cff.dwbooster.com/customization
Best regards.