Home > Forum > Rules, JS, SQL > Is Javascript faster than Formrules?

Is Javascript faster than Formrules?
0

Good day webcon community,
As the title states, i ask myself if javascript is faster than using formrules.

As example i had a formrule what would get the sum of a number column in an item list and compare it to another field. It took sometime for the formrule to procress this, while my javascript that i wrote in a html element did it much faster.
I wonder now if i should reimplement certain functions with javascript instead of using formrules to shorten the page loading time.
So can someone pls list the benefits/disadvantages of using formrules as opposed to javascript?

MVP

Hi Almin,

the graphical form rules are turned into JavaScript. If you take a looks at it you will notice a whole bunch of checks, promises and so on which is mandatory so that it graphical creation / combination won’t break anything.
If you have a complex form rule, open the expression editor and click on show.

Therefore a dedicated JavaScript will be faster than the generic one but less fail safe.

I just had to debug an issue which prevented the loading of a form because of some JavaScript bug which didn’t happen in all cases.

In the end it’s up to you to decide whether a specific form rule can be replaced with only minor risks that something will break.

Before you just go ahead with this, I recommend to activate the diagnostic mode and verify what takes long.

Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings