19 Mar 2013 5:27 AM #1
Usage of new ExtJS 4.2 bufferedrenderer Grid
How exactly is the new bufferedrenderer grid to be used?
Do I have to load all records into the store (buffered: false, pageSize: 50000 (or whatever)) or do I have to add buffered: true and pageSize to the store to make this thing work?!?
Case 1 reduces the DOM elements as expected - but of course you still have the mega loading time since you are loading ALL records!
Case 2 actually produces less DOM elements if you DO NOT add the bufferedrenderer!
So what exactly is the purpose of this new feature?
Thanks for your help!
19 Mar 2013 12:18 PM #2
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
The buffered renderer only renders what it needs to be viewed (+ a few either side to keep smoothness). It can be used with or without a buffered store.
Using it with a buffered store is good when you have a ~lot~ of records, because it will continually request what it needs from the server.
If you have a small amount (say 2000), it's better to use a normal store with buffered rendering.Evan Trimboli
Twitter - @evantrimboli
Don't be afraid of the source code!
20 Mar 2013 12:35 PM #3
To better understand the new plugin, it's worth examining the general "buffered rendering/loading" concept, and how it differs from 4.1 to 4.2.
- Buffered Loading - term relevant to the store i.e. we want our store to contain the 3rd page of 500 records of the 1 million that exists in the backend
- Buffered Rendering - term relevant to the grid view i.e. our store contains 500 records, but we only want to render 50 HTML rows at a time in DOM
- The two functionalities were "lumped" together, where you achieved both Buffered Loading and Rendering in one punch, by setting "buffered: true" on the store connected to the grid
- As the two concepts are logically separate, you still had ability to configure how the store buffers (i.e. pageSize, leading, and trailing buffer zones), as well as how the grid renders (on the vertical scroller you could specify leading and trailing zones)
- The "bufferedrenderer" plugin enables Buffered Rendering on the gridview, regardless of whether store is buffered or not, effectively de-coupling this functionality
- Using only store "buffered: true" setting still behaves like it did in 4.1 - the behaviors are coupled, so both Buffered Loading (Store) & Rendering (Grid View) are utilized
- For that matter, using "buffered: true" on a store simply causes the "bufferedrenderer" plugin to be used with the grid
12 Apr 2014 6:49 AM #4
I was hoping the bufferedrenderer would help me with this, but it seems that I would still need to use the buffered store. As some of our tables have 70k records. Any suggestions?