As we all know, Microsoft has chosen and released some of its items under a free MIT license. Among them were their new jQuery plugins. The plug-ins were so powerful that the “independent” community decided to include, so long-requested template functionality, the main library ( here ). Nonsense! Furor! Or ... Or are there any other reasons? We will not clarify this, but rather look at the comparative tests of this library, and consider whether we really need it.
It all started with the fact that I tried the template library in my new functionality. I was discouraged. The system was so inhibitory that I climbed up to see if there was a virus or other demonic creature in the processes. Everything turned out to be clean, and then I decided to compare the performance of the library with other options. ')
Curved hands: Adding span one by one: $ ("<span />"). Text (..). AppendTo (..)
Straight arms: Adding a span line formed by gluing an array
Testing method
To score a thousand span in div
Compare time
To conclude
???
Profit
Analyzed browsers
Internet Explorer 8
Mozilla 3.6.12
Chrome 8. How quickly time flies, I remember it in the first version, and IE already caught up with it, soon the opera will overtake.
Opera 10.63
results
findings
The new template engine from MS is on average 29 times slower if everything is done with pens.
In the case of Opera, it is comparable, in performance, with crooked hands, for which, IMHO, it is necessary to drive backwards ...
The existing PureJSTemplate in some tests turned out to be comparable with straightened arms. And in some cases, and faster, which, in general, it is strange.
PureJSTemplate in IE8 shows very strange results compared to other plugins.
IMHO conclusions
The absolute winner in all tests recognized Chrome, who would doubt.
IE8, surprisingly, is comparable to Opera. Personally, I'm in shock.
Understanding my paranoia, I think Microsoft deliberately released a stunned product in order to intimidate the market for AJAX applications.
I do not need to talk about the convenience and separation of design and code. Everything has a limit. The PureJSTemplate would be better developed so that it would not be necessary to create a textbox for each template, and not necessarily indicate where I would get the result.