Re: performance over iterate

2002-02-11 Thread Alberto Bolchini

Hi Arron.

I am aware of Netscape's idiosyncrasy for nested tables, and as the code
snippet showed, I just used one table, playing around w/ colspans.
Actually my Leaf would eventually return a _null_ on the getChildren
method thus breaking the nested iterator. Returning an empty array and
taking away all of the nested:notEmpty really made the difference.

Thanks.
a.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




performance over iterate

2002-02-10 Thread Alberto Bolchini

hi all.
 
I'm using a nightly build with the nested extension tags.
 
I expose to the View (jsp) a Component bean (GoF Composite pattern) and
I need to have a 4 level iteration over the Component's children. These
can be Composite (and thus _have_ children) or Leaf (and thus have no
children).
 
I have used the nested extension to iterate over the collections with
something that looks like the following:
nested:nest ...
table ...
nested:notEmpty property=children 
nested:iterate property=children
tr td .../td/tr
nested:notEmpty property=children
nested:iterate property=children
tr td .../td/tr
nested:notEmpty property=children
nested:iterate property=children
tr td .../td/tr
nested:notEmpty property=children
nested:iterate property=children
tr td .../td/tr
/nested:iterate
/nested:notEmpty
/nested:iterate
/nested:notEmpty
/nested:iterate
/nested:notEmpty
/nested:iterate
/nested:notEmpty   
/table
 
Well. Those four iterations, take a very long time to perform. 
 
Is there a better way to perform the task?
 
Thanx.
alberto.



Re: performance over iterate

2002-02-10 Thread Arron Bates

Alberto,

I've found that the viewable performance is also in the time it takes 
for the browser to render the Html.
NS6  IE6 it usually isn't that bad, but use NS4 and you'll see it. I 
ran the Monkey example in NS4 and it almost killed it. :)
It did render, but it took a while.

But, I then re-wrote it to use a single table, and it became lightning 
fast on all browsers including NS4.

It's great to logically represent nested levels in an extra table, but 
sometimes it's easy to get carried away.
If you spend a little extra time to get the colspan's and such right to 
make it all a single table, you'll get a lot of render speed back for 
your effort. Even if there's more markup, the browser is happier.

To confirm the speed of the iterating itself, replace the table markup 
with nonsense font tags, spaces or whatever and see how long it takes to 
produce the page. If it's quick, then there's a rendering problem.

As an extra point... you could try removing the nested:notEmpty tags 
and initialise the collections variables as zero length collections. As 
if there's nothing in the collection, the iterate tag will simply skip 
it on it's own. This is just to save the overhead of the extra tag 
evaluation on each step within each iteration.

Hopefully somewhere in all this you can get back some speed to your page.
If not, please get back to us.


Arron.

Alberto Bolchini wrote:

hi all.
 
I'm using a nightly build with the nested extension tags.
 
I expose to the View (jsp) a Component bean (GoF Composite pattern) and
I need to have a 4 level iteration over the Component's children. These
can be Composite (and thus _have_ children) or Leaf (and thus have no
children).
 
I have used the nested extension to iterate over the collections with
something that looks like the following:
nested:nest ...
table ...
nested:notEmpty property=children 
nested:iterate property=children
tr td .../td/tr
nested:notEmpty property=children
nested:iterate property=children
tr td .../td/tr
nested:notEmpty property=children
nested:iterate property=children
tr td .../td/tr
nested:notEmpty property=children
nested:iterate property=children
tr td .../td/tr
/nested:iterate
/nested:notEmpty
/nested:iterate
/nested:notEmpty
/nested:iterate
/nested:notEmpty
/nested:iterate
/nested:notEmpty   
/table
 
Well. Those four iterations, take a very long time to perform. 
 
Is there a better way to perform the task?
 
Thanx.
alberto.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]