|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Grid causing "slow script" message.Hello all, I am using dojo 1.1.1. I have a grid with 20 columns (1 view), with a mixture of input boxes and combo boxes. I'm loading data in the grid via store, which contains slightly more than 200 records. When the data gets loaded into the grid, often times I get a message saying that the script is taking longer than expected and the browser asks if I would like to continue or stop the script. Using firebug's profiler it shows that getPageNodePosition in the scroller.js file is consuming over 50% of the process time. This function is extremely simple and returns a node's offsetTop value. Can anyone tell me why that function would consume so much time? Is the profiler wrong/misguided? Is there something I can do to increase performance on this grid? I have many other applications utilizing the grids, with fewer rows and columns, and none of them seem to have this problem. Thanks, --Jason _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Grid causing "slow script" message.Lacking some details in order to better help, are you using a custom build or relying on dojo.require() to bring in what you need? As for that function call, I cant answer that.
-Karl Tiedt On Mon, Jul 21, 2008 at 11:13 AM, Jason Solan <jsolan@...> wrote:
_______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Grid causing "slow script" message.On Mon, 2008-07-21 at 12:02 -0500, Karl Tiedt wrote: > Lacking some details in order to better help, are you using a custom > build or relying on dojo.require() to bring in what you need? As for > that function call, I cant answer that. > > -Karl Tiedt > Sorry. It is not a custom build. It is the "standard" profile with crossdomain. I've also used the AOL CDN build and seen the same results. These are the requires I'm using dojo.require("dojo.parser"); dojo.require("dijit.layout.LayoutContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.form.FilteringSelect"); dojo.require("dojo.data.ItemFileWriteStore"); dojo.require("dojo.data.ItemFileReadStore"); /* Needed for Grid */ dojo.require("dojox.grid.Grid"); dojo.require("dojox.grid._data.model"); dojo.require("dojox.grid._data.editors"); dojo.require("dojox.grid._data.dijitEditors"); /* End needed for Grid */ /* Needed for Toolbar */ dojo.require("dijit.Toolbar"); dojo.require("dijit.form.Button"); /* End needed for Toolbar */ Anything else needed? Thanks. > On Mon, Jul 21, 2008 at 11:13 AM, Jason Solan > <jsolan@...> wrote: > > Hello all, > > I am using dojo 1.1.1. I have a grid with 20 columns (1 > view), with a > mixture of input boxes and combo boxes. I'm loading data in > the grid > via store, which contains slightly more than 200 records. > When the data > gets loaded into the grid, often times I get a message saying > that the > script is taking longer than expected and the browser asks if > I would > like to continue or stop the script. > > Using firebug's profiler it shows that > getPageNodePosition > > in the scroller.js file is consuming over 50% of the process > time. This > function is extremely simple and returns a node's offsetTop > value. > > Can anyone tell me why that function would consume so much > time? Is the > profiler wrong/misguided? Is there something I can do to > increase > performance on this grid? > > I have many other applications utilizing the grids, with fewer > rows and > columns, and none of them seem to have this problem. > > Thanks, > --Jason > > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://dojotoolkit.org/docs/book > Forums: http://dojotoolkit.org/forum > Dojo-interest@... > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest > > > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://dojotoolkit.org/docs/book > Forums: http://dojotoolkit.org/forum > Dojo-interest@... > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Grid causing "slow script" message.Looks like I found the problem.
I have one column which uses a get function to display a value. The very first thing I did to try to find the cause of the issue was remove that column from the view. When I tested I _still_ got the unresponsive script error. I put the column back in and continued trying some other things. Eventually I modified the get function to set the font size to 10px and that seemed to fix the issue. It makes sense to me that the get function could cause a problem like this, as the html being returned made the cell slightly larger than the rest of the cells. What doesn't make sense, is why the issue still occurred with that cell out of the view. Maybe I changed something else too, or maybe I just tested wrong the first time, because when I test it now it works fine with that out of the view. > It is not a custom build. It is the "standard" profile with > crossdomain. I've also used the AOL CDN build and seen the same > results. > > > On Mon, Jul 21, 2008 at 11:13 AM, Jason Solan > > <jsolan@...> wrote: > > > > Hello all, > > > > I am using dojo 1.1.1. I have a grid with 20 columns (1 > > view), with a > > mixture of input boxes and combo boxes. I'm loading data in > > the grid > > via store, which contains slightly more than 200 records. > > When the data > > gets loaded into the grid, often times I get a message saying > > that the > > script is taking longer than expected and the browser asks if > > I would > > like to continue or stop the script. > > > > Using firebug's profiler it shows that > > getPageNodePosition > > > > in the scroller.js file is consuming over 50% of the process > > time. This > > function is extremely simple and returns a node's offsetTop > > value. > > > > Can anyone tell me why that function would consume so much > > time? Is the > > profiler wrong/misguided? Is there something I can do to > > increase > > performance on this grid? > > > > I have many other applications utilizing the grids, with fewer > > rows and > > columns, and none of them seem to have this problem. > > > > Thanks, > > --Jason > > > > _______________________________________________ > > FAQ: http://dojotoolkit.org/support/faq > > Book: http://dojotoolkit.org/docs/book > > Forums: http://dojotoolkit.org/forum > > Dojo-interest@... > > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest > > _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
| Free Forum Powered by Nabble | Forum Help |