Parsley.js: parsley very slow on large form

Hello,

parsley is very slow on form with around 100 - 200 inputs. it’s take around 1000 ms for the dom to complete. I do like this

$(document).ready(function(){
  $myForm.parsley();
});

i guess it’s because $myForm.parsley(); will modify the dom mostly by adding/removing new elements. this effect of updating the dom is very slow (and bad) ! maybe it’s better to add the new elements when they are actually need. exemple empty elements like <ul id="parsley-id-9096" class="parsley-errors-list"></ul> are they really necessary before an error is raised ?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 34 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Hi,

I have also encountering slow, and unresponsive in chrome browser using $('form').parsley().validate(); in 800 - 1000 inputs. I have already upgrade to version 2.62. I am the only one encountering these? If these are not normal I will just move in grouping validation instead of form validation.

Sorry for my bad explanation. 😃

Thank you, Chenee

It’s not clear in the doc, but exclusion is decided after elements have been initialized, so it’s possible to have a data-parsley-excluded attribute on specific elements to exclude, so it won’t change much the loading time. We have decided to roll back the jQuery events and go back to a homegrown pubsub for 2.1. Stay tuned…