unify / unify

Unify Project
http://www.unifyjs.com
Other
152 stars 16 forks source link

creating complex widget hierachies causes slow rendering #61

Closed dominikg closed 12 years ago

dominikg commented 12 years ago

on creating complex widget structures, each child is added to a domnode with appendchild without creating the whole structure inside a documentFragment first.

Maybe we can reuse the existing qx.html.Element abstraction for it? Or is that too heavyweight and we should write something more simple?

dominikg commented 12 years ago

dirty and unfinished work that uses qx.html.Element in place of dom element in unify.core.Widget _createElement

https://github.com/dominikg/unify/tree/widgets-qxhtml

changing dom elements to the abstraction requires multiple changes throughout the code base (setting styles, attributes, event listeners , everything must be adapted). Luckily most changes are quite simple (calling the correct api function of the abstraction). Some things like identifying the widget of a dom element need more work (currently done via an additional registry map, room for optimization)

fastner commented 12 years ago

No, don't do that. qx.html.Element is very heavy weight. All modern browser could handle that itself in a better way. Qooxdoo uses qx.html.Element to support e.g. IE6. The widget system should add all items in one rush to the DOM, so this behaviour should be fine. Do you have any issues with that?

fastner commented 12 years ago

Is your issue with initial rendering or with rendering from RemoteView?

fastner commented 12 years ago

Changed rendering process to use DocumentFragment and appends to DOM after changes everything in DocumentFragment. Thanks to @dominikg to improve speed :)