madrobby/zepto — pull request #750 by jussi-kalliokoski (2013-04-29 09:31:42+00:00)
Title: Optimised the common case of single elements going to zepto.fragment

I'm maintaining a mobile application that uses Zepto and Backbone, and while optimising it I noticed that there is an unusually large time spent in creating views. Tracing this down, the culprit was zepto.fragment which caused a HTML parse operation for what could be just creating a DOM element.

I made some changes to zepto.fragment for it to detect the single element case which Backbone does every time you create a view and to use ``` document.createElement() ``` in that case instead of HTML injection.