Hello John,
most of the time, the bottleneck in performance is creating the widgets. So
if you have that huge number of widgets, it would be a good idea to start of
with creating the widgets on demand. So just create the widgets shown on the
first tab page. If another tab is clicked, create these widgets as well.
Getting rid of the non visible, already created screens is not a good idea
in my opinion, even if you pool the widgets. That would be the first step I
would take because I guess all other steps do not bring such a performance
boost. (1)
Sure, your method of creating the widgets has always on method call in
addition to the needed calls. But I don't think that this is a huge impact.
But if you need every bit of performance, this can also help. (2)
As in case two, some less method calls might be good for performance but
does not have that big impact. (3)
Best,
Martin
John Spackman wrote:
>
> Hi guys,
>
>
>
> We have an app with a tabview that has 12 pages and approx 300-400
> controls
> (plus labels), everything from simple text fields to a dozen or so tables;
> while this is ok in FF35 (albeit a little slow to start up) not
> surprisingly
> performance is poor in IE and even in IE8 you always get the "your script
> is
> running slowly, do you want to stop it" message. I'm about to start
> optimising it but before I dive in I'd like some advice and to ask for a
> few
> questions:
>
>
>
> 1. I've read the "enterprise development" doc and it looks like using
> object
> pooling is the first step, and I could make each page create it's controls
> as it first appears - but as a page is hidden, should it's controls go
> back
> into the pool for the next tab? IE, is object pooling just about dividing
> the initial startup-time onto each page, or is creating DOM objects so
> slow
> (and JS so fast) that I could pool the controls each time the visible page
> changes and _still_ end up with a faster app?
>
>
>
> 2. Our Qx apps are computer generated (this app has 3,400 lines) and at
> the
> moment the startup code defines lots of nested functions and calls them
> recursively (this is so that each widget definition has its own scope),
> EG:
>
> var f = function() { var myWidget = new
> qx.ui.form.Checkbox(); ... };
>
> f();
>
> I could change this (for example) so that the initialisation is a JSON
> definition of properties and event-handlers and then write a single
> (non-recursive) function that initialises according to the JSON
> description;
> this would be smaller and more compact I'm sure, but would it be faster?
> IE
> is there any evidence that performance of recursive function calls are
> slower than array manipulation? Does a large JSON array parse
> significantly
> faster than code?
>
>
>
> 3. Setting properties by calling "myObj.set({ prop1: value, prop2: value
> })"
> is convenient but is it slower than multiple calls to individual setXxxx()
> methods? (this is computer generated so convenience does not matter to
> me).
> As a related note, it would be great if the setXxxx() methods returned the
> object so we could do "myObj.setProp1().setProp2()...etc" which would save
> JS from having to scan the scope for "myObj" each time.
>
>
>
> Thanks
>
> John
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://n2.nabble.com/Performance-tuning-questions-tp3429360p3429869.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel