I have a grid that contains around 14000 items. They are stored in a JSON datastore like the example that is given on the grid widgets page in the book of Dojo. Many times as I scroll through the grid, I have to wait for a number of seconds for the next items to load. Is there any way to speed the grid up?
note: While I have been working on this, I have had the datastore and the source html on a local machine so I know the slowdown is not related to the network. Thanks in advance!
Grid is Slow
Submitted by Josh.MIPS on Fri, 02/08/2008 - 01:16.
- Login or register to post comments
- Subscribe post

that is "lazy loading"
dojo grid's item fetching mechanizm is "lazy loading".
not all 14000 items are fetched into grid at initialized time. instead of that, if you scroll down the grid, the grid caculates the scroll's current position and fetching the items that corresponding to current scroll position from the datasource that has 14000 data
I don't have experience with
I don't have experience with very large grids, just ones that have a hundred or so rows. Not sure if the speed problem you see with the Grid is internal to the Grid or to the choice of data store attached to the Grid. Do you need a "write" data store for your grid? If not, one of the lighter weight data stores may speed things up.
http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-...
Also, if you are currently loading all 14,000 items into local memory, you may see a performance increase by using something like the QueryReadStore (sort of a just-in-time store):
http://dojotoolkit.org/book/book-dojo/part-3-javascript-programming-dojo...
There may be additional, not yet listed, stores in the dojox.data directory.
Some of the Grid and Grid Model options, e.g., rowsPerPage (both Model and Grid), keepRows, may affect performance.
I'm guessing that setting your options such that the # of rowsPerPage, and perhaps keepRows, will reduce the row rendering time.
Try setting delayScroll
We made a demo using Dojo grid to display data supplied and manipulated by SnapLogic, and noticed the grid scrolling performance lacking on very large (50,000+ rows) data sets. Setting delayScroll="true" in the grid's tag to make the grid not try to load intermediate data sets while scrolling until scrollbar stops for at least a short time helped speed things up. You can see the source at http://demo.snaplogic.org/griddemo.html
- Login or register to post comments
Data residing on potentially multiple servers in different formats can be grabbed and manipulated (filtered, sorted, joined, etc.) entirely via SnapLogic framework on the server using easy-to-create "piplines", and then exposed via RESTful interface and fed into the Dojo grid. More information about the SnapLogic/Dojo grid demo is in this post: http://www.dojotoolkit.org/forum/dojo-foundation/dojo-showcase/using-sna...
Not only the Grid , but also the whole dojo run slowly
The whole dojo run slowly.
Maybe it's only because that I'm using FireBug.
But even use the IE as the browser and set the "idDebug=false" , the web page is still very slow.
The "dojo.js" is a weight file , and so it is with other .js files.
Most files contain the comments, I wonder why don't clear the comments off ?