Hi Ralf,

Am 02.08.2010 17:25, schrieb Ralf Nieuwenhuijsen:
Hi Dietrich,

I've been following your thread. I'm not a qooxdoo developper, but i'm a bit suprised you don't want to solve the *real problem*.

Good to hear form someone knowing my real problem. I should stop paying my couch doctor ;-)

You went from an '/bad/' situation (a few seconds to load a tab) to an /'unacceptable'/ situation.
Why not just aim for *0.1 sec load time*?

Your current setup is not optimal because:
- you use memory for all kinds of widget on tabs that may never be viewed at all - you dispose and recreate the form for every record the user views. Disposing takes time as well, and is much more prone to bugs.

That's not true. The form is reused. The loadtime is on first form open. Subsequent opening is alot faster.


  - rendering isn't instantly for the user.

*Here's are three quick (say: 10 minute) solutions:*

    * *There can only one record open at the same time and the
      application is constantly running:*

      Don't recreate the form-widgets whenever somebody selects a new
    record!
      You can re-use the existing form! For example, by re-binding the
    model in your controller to the model of other record.

      You'll still have the 9 second delay, but it will happen just once.
      But if you combine this approach, with the 'draw sub-form' on
    'appear' trick below, all delays will be gone.

    * *You currently use a custom form renderer that creates a bunch
      of tabs:*

    Change this code in your customer form-renderer:

        var vPage = new qx.ui.tabview.Page('TabTitle');

        // adding a bunch of fields
        vPage.add( the label );
        vPage.add( the form-field );

Hmmm... where did you got my source code from? You did not or did you?

    To something like this:

        var vPage = new qx.ui.tabview.Page('TabTitle');
        vPage.addListenerOnce('appear', function(){

          // adding a bunch of fields
          this.add( the label );
          this.add( the form-field );

        }, vPage);


*You currently add several forms to all tabs individually*

    Change this code in your customer form-renderer:

        var vPage = new qx.ui.tabview.Page('TabTitle');

        // adding a form
        vPage.add( the form );

    To something like this:

        var vPage = new qx.ui.tabview.Page('TabTitle');

        // adding a form
        vPage.addListenerOnce( 'appear', function(){

          this.add( the form );

        }, vPage);


The patient chart is loaded as a single xml-request. So, even if not visible, values are loaded into fields and cause changevalue events which have an influence to other fields like disabled fields etc.

I'm still not 100% shure if the raise in created dom elements causes the problem. I'm still investigating.

--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner



------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to