users@woodstock.java.net

RE: Perfomance problem with Woodstock

From: Alex Sherwin <alex.sherwin_at_acadiasoft.com>
Date: Thu, 17 Jul 2008 13:14:21 -0400

The newer Woodstock components let the full page download. Unfortunately,
the default behavior is, like you mentioned, not directly drawing the
components. Instead, JavaScript is rendered, and when the page is fully
downloaded all the JS is invoked, which dynamically creates and inserts HTML
DOM elements.

This obviously has some advantages, since now there is a full client side
javascript framework/representation of the DOM, so you have a full suite of
JavaScript API functions you can use on the client side that allow you to do
various things (change values, reset to original state, async redraw etc).

But it gives a very unprofessional and "slow" look to the page due to the
way it is rendered. Luckily, they have included a few things to change this
behavior a bit...

On the webuijsf:head component, there are a few attributes:

<webuijsf:head id="head1" title="Title" webuiOnLoad="false"
parseOnLoad="false">

webuiOnLoad
parseOnLoad

Which effect the behavior of the rendering/javascript rendering.

See http://webdev2.sun.com/woodstock-tlddocs/ for the Woodstock TLD docs and
look at webuijsf:head component for a detailed description of these
attributes


Alex Sherwin
alex.sherwin_at_acadiasoft.com

-----Original Message-----
From: Alex [mailto:evilhare_at_yandex.ru]
Sent: Thursday, July 17, 2008 10:54 AM
To: users_at_woodstock.dev.java.net
Subject: Perfomance problem with Woodstock

Hi! We have moved our project from Sun Creator + Basic Visual Web Components
to Netbeans 6.1 + Woodstock Components (using automatic converter). So it is
very annoying decrease of the perfomance, for example table with 50 rows &
10 cols is rendered about 3 seconds, at first it is displayed collapsed
without data, and after it it is slowly populated with components (labels,
textfields). Old Basic Components from Sun Creator were much more faster.

I've looked in HTML sourse, and for each components there is no direct HTML
tag (lite <input> for textField), there is something like this:

<script
type="text/javascript">webui.suntheme4_2.widget.common._createWidget('_form1
:table1:tableRowGroup1:35:tableColumn10:staticText10',{"widgetType":"webui.s
untheme4_2.widget.staticText","value":"251","visible":true,"escape":false,"i
d":"form1:table1:tableRowGroup1:35:tableColumn10:staticText10"});</script>

for each component! For example, if I have table 50*10 with 2 components in
each row is corresponds to 1000 calls of JS function!!! Why did developers
do so strange (for me) thing? Why not to transfer JSF tags to HTML tags
without JS calls?

Is it possible to avoid this huge number of JS scripts?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
For additional commands, e-mail: users-help_at_woodstock.dev.java.net