Jim Hunter schrieb:
> I think you have me on the right track. I just did some timing tests 
> and creating these 'virtual' controls is much faster and leaves no 
> JavaScript memory footprint behind. There was a slight change to the 
> sample you sent, I can not do label.getElement() as this does not 
> exist, but I was able to do label.getContentElement() and it worked 
> perfect. Now I am going to figure out how to showhorn this technique 
> into my current code to see what kind of improvements I can get.
>  
Hi Jim,

I would be interested in your results.

Best Fabian


>
>
>  
> On Mon, Jan 12, 2009 at 3:10 AM, Fabian Jakobs <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Jim Hunter schrieb:
>     > Thanks for the reply, but no, I wasn't thinking of the table
>     controls.
>     > I was reading about the new features of .8 and read about other
>     > 'virtual' controls and was excited because I immediately thought
>     about
>     > this scenario for their use. But at the time I read the news, I
>     hadn't
>     > even started my conversion to .8. Now that I have most of my app
>     > converted and running, I really need extremely light wieght controls
>     > to get past this problem.
>     >
>     > I already have a version of my application where I create ALL
>     the HTML
>     > but I don't have any way to theme it and doing it myself is a step
>     > backward.
>     If you need theming using plain HTML becomes a problem.
>
>     We don't have lighweight controls in 0.8 but I have an idea how you
>     could solve your problem.
>
>     Its a bit of a hack and I'm not sure if it will work but you can at
>     least try it. The idea is basically to use just one label widget and
>     "steal" the rendered HTML.
>
>     var label = new qx.ui.basic.Label()
>
>     // repeat these steps for all your label instances.
>
>     label.set({
>      content: "text"
>      ... // configure the label
>     });
>
>     this.getRoot().add(label, {left: -1000, top: -1000}); // DOM nodes are
>     only generated for widgets added to the application
>     qx.ui.core.queue.Manager.flush(); // flush all queues, this triggers
>     generation of the DOM nodes.
>     var labelDom = label.getElement().getDomElement().cloneNode(true);
>     // do
>     a deep copy of the label DOM
>
>     // insert these domNodes into your report
>     labelDom.style.left = "20px";
>     labelDom.style.top = "10px";
>     report.getElement().getDomElement().appendChild(labelDom);
>
>
>     This way you only need one label instance. This should be much faster
>     than creating hundreds of labels. Of coarse you cannot interact
>     with the
>     cloned widgets and you cannot modify them. I would be interested
>     if this
>     works and if it solves your problem.
>
>     Best Fabian
>     >
>     > I can't create any sort of master control because I never know
>     what is
>     > going to be displayed, that is 100% designed by the client using the
>     > software, I simply display what they create. I read in the form/tool
>     > definition out of a db and render it on the fly. Most of the
>     controls
>     > are labels and edit boxes, but they do need to match the theme being
>     > used (which is also set by the user and 'created' at run time). I
>     > suppose I could create a subclass of these basic controls and after
>     > they are rendered have the control delete itself to free up memory.
>     > That is if doing a JavaScript delete would kill the control but not
>     > remove the DOM rendering of it?
>     >
>     > Thanks,
>     > Jim
>     >
>     >
>     > On Mon, Jan 12, 2009 at 1:47 AM, Fabian Jakobs
>     <[email protected] <mailto:[email protected]>
>     > <mailto:[email protected] <mailto:[email protected]>>>
>     wrote:
>     >
>     >     Jim Hunter schrieb:
>     >     > I remember reading, a couple of months ago, that there
>     were new
>     >     > controls in .8 that were basically DOM only controls so
>     that they
>     >     > would be created and written to the DOM without using up
>     memory.
>     >     I think you are talking about the table and TreeVirtual.
>     Both widgets
>     >     don't create any qooxdoo widgets for the contents. They just
>     >     create the
>     >     required HTML markup and add it to the table pane using
>     innerHTML.
>     >
>     >     > I just spent the last hour trying to find information on the
>     >     controls
>     >     > but I seem to be coming up short. Can someone lend some
>     advice as to
>     >     > what is the best way to go about creating DOM controls
>     that are
>     >     > basically only needed to display information, no event
>     handling
>     >     etc. I
>     >     > am working with user generated pages and on one page, that
>     contains
>     >     > hundreds of controls, it takes over 30 seconds to render
>     on IE7. The
>     >     > same page on FireFox renders in just a couple of seconds.
>     I know
>     >     that
>     >     > IE sucks on JavaScript, but I don't have a choice, I have
>     to support
>     >     > it. So I need to make rendering this page as fast as
>     possible and I
>     >     > won't need access to the controls once they are rendered
>     to the
>     >     > browser. Any ideas?
>     >     Is it possible to combine those controls into one single widget?
>     >     If this
>     >     is the case you could use an HtmlEmbed widget and render the
>     >     contents of
>     >     your controls using plain html.
>     >
>     >     Best Fabian
>     >
>     >
>     >
>     >     >
>     >     > Thanks,
>     >     > Jim
>     >     >
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >     >
>     >     >
>     >    
>     
> ------------------------------------------------------------------------------
>     >     > Check out the new SourceForge.net Marketplace.
>     >     > It is the best place to buy or sell services for
>     >     > just about anything Open Source.
>     >     > http://p.sf.net/sfu/Xq1LFB
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >     >
>     >     > _______________________________________________
>     >     > qooxdoo-devel mailing list
>     >     > [email protected]
>     <mailto:[email protected]>
>     >     <mailto:[email protected]
>     <mailto:[email protected]>>
>     >     > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>     >     >
>     >
>     >
>     >     --
>     >     Fabian Jakobs
>     >     JavaScript Framework Developer
>     >
>     >     1&1 Internet AG
>     >     Brauerstraße 48
>     >     76135 Karlsruhe
>     >
>     >     Amtsgericht Montabaur HRB 6484
>     >
>     >     Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich,
>     >     Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus
>     Huhn,
>     >     Oliver Mauss, Achim Weiss
>     >     Aufsichtsratsvorsitzender: Michael Scheeren
>     >
>     >
>     >    
>     
> ------------------------------------------------------------------------------
>     >     Check out the new SourceForge.net Marketplace.
>     >     It is the best place to buy or sell services for
>     >     just about anything Open Source.
>     >     http://p.sf.net/sfu/Xq1LFB
>     >     _______________________________________________
>     >     qooxdoo-devel mailing list
>     >     [email protected]
>     <mailto:[email protected]>
>     >     <mailto:[email protected]
>     <mailto:[email protected]>>
>     >     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     >
>     
> ------------------------------------------------------------------------------
>     > Check out the new SourceForge.net Marketplace.
>     > It is the best place to buy or sell services for
>     > just about anything Open Source.
>     > http://p.sf.net/sfu/Xq1LFB
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > qooxdoo-devel mailing list
>     > [email protected]
>     <mailto:[email protected]>
>     > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>     >
>
>
>     --
>     Fabian Jakobs
>     JavaScript Framework Developer
>
>     1&1 Internet AG
>     Brauerstraße 48
>     76135 Karlsruhe
>
>     Amtsgericht Montabaur HRB 6484
>
>     Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich,
>     Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn,
>     Oliver Mauss, Achim Weiss
>     Aufsichtsratsvorsitzender: Michael Scheeren
>
>
>     
> ------------------------------------------------------------------------------
>     Check out the new SourceForge.net Marketplace.
>     It is the best place to buy or sell services for
>     just about anything Open Source.
>     http://p.sf.net/sfu/Xq1LFB
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim 
Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to