BorisMoore / jquery-tmpl

The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
3.23k stars 1.01k forks source link

{{each}} is slow when not wrapped with element #102

Open psayre23 opened 13 years ago

psayre23 commented 13 years ago

http://jsfiddle.net/psayre23/982qD/

The {{each}} command is pretty slow when used with the newest forms of jQuery. In jQuery 1.5 and up the following template is very slow.

{{each elems}}
  <p>{item}</p>
{{/each}}

Right now, the fix is to wrap the {{each}} in an element:

<div>
{{each elems}}
  <p>{item}</p>
{{/each}}
</div>

The reason for this speed issue seems to be a change in how jQuery compares siblings.

rdworth commented 13 years ago

Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.