New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimize validation.js performance #4435
Conversation
@test OK This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4435. |
@Fedik can you fix the |
Conflicts: media/system/js/validate.js
@zero-24 done 馃槈 and I added |
Thanks @Fedik @test successful I can't see any issues with the patch applyed.
|
yes, would be good to retest 馃槈 @anibalsanchez can you please try one more time? 馃槈 |
... hmmm ... I have manually copied the two files... In Global Configuration, I try to save an empty Site Name, it shows the message "Invalid field: Site Name"... Cancel button does not work. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4435. |
@anibalsanchez I just checked without the patch, and got same result as you, |
yes it 馃悰 on the configuration page, |
@Fedik do you think we should fix this with this pull or should we open a new for this issue? |
@Fedik You are right here: cancel button has and the script we inject is : Joomla.submitbutton = function(task)
{
if (task == "application.cancel" || document.formvalidator.isValid(document.getElementById("application-form")))
{
Joomla.submitform(task, document.getElementById("application-form"));
}
}; |
@zero-24 I think would be better separate as it is different things .. I can try make another pull with fix, but at evening |
Thanks moving here to RTC as the other issue will be handled in a seperate PR by @Fedik Thanks to all! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4435. |
@test success |
there fix for cancel button #5738 |
optimize validation.js performance
it a try to optimise the Joomla! form rendering with a lot inputs.
validation.js
it third slow script afterchosen.js
andbootstrap.tooltip
on the form page,Here is some graphs.
test made with disabled
chosen.js
andbootstrap.tooltip
on Global configuration page.Before this fix:
After fix:
As can see difference around 400ms for
JFormValidator
initialization, at least on my PC in Chrome 馃槃How to test.
Apply patch.
Go to global configuration, or other form where a lot inputs, and compare whether all still works and whether it "feels faster" 馃槈