Rajat K. Paharia
2005-06-02 06:01:00 UTC
When my app starts up I have a function that
initializes all the grids that I use in my app. There
are 6 grids, with a total of 26 columns between them
being initialized with code like this:
col = new DataGridColumn("icon");
col.headerText = "";
col.width = 25;
col.cellRenderer = "IconCellRenderer";
grid.addColumn(col);
Running this code takes a loooooong time. When I
comment this code out, on a fast machine my app takes
1-2 seconds to start. When I leave it in, my app takes
6-7 seconds to start. I tested my app on an older
machine (Win2k, P3-450, 320MB RAM) and it took so
long, I even got the dreaded "Script running slowly"
error, which shocked me.
Is there some more efficient way to setup grids? Or do
I need to make the initialization of each grid "on
demand" to spread the delay around, rather than
iniitalizing them all at once at application startup?
Any ideas would be appreciated. best, - rajat
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html
initializes all the grids that I use in my app. There
are 6 grids, with a total of 26 columns between them
being initialized with code like this:
col = new DataGridColumn("icon");
col.headerText = "";
col.width = 25;
col.cellRenderer = "IconCellRenderer";
grid.addColumn(col);
Running this code takes a loooooong time. When I
comment this code out, on a fast machine my app takes
1-2 seconds to start. When I leave it in, my app takes
6-7 seconds to start. I tested my app on an older
machine (Win2k, P3-450, 320MB RAM) and it took so
long, I even got the dreaded "Script running slowly"
error, which shocked me.
Is there some more efficient way to setup grids? Or do
I need to make the initialization of each grid "on
demand" to spread the delay around, rather than
iniitalizing them all at once at application startup?
Any ideas would be appreciated. best, - rajat
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html