PDA

View Full Version : [CLOSED] Filtering buffered data in GridPanel with Infinitive Scrolling



HansWapenaar
Sep 26, 2019, 2:05 PM
Hi,

I'm back to Ext.net and upgrading some web applications from 3.3 to 5.0.

About one change I have a question: how to replace the BufferedRenderer plugin.

In 3.3:


Plugins>
<ext:FilterHeader ID="FilterHeader1" runat="server" />
<ext:BufferedRenderer ID="BufferedRenderer1" runat="server" LeadingBufferZone="10" TrailingBufferZone="20" />
</Plugins>

I removed the BufferedRenderer plugin and added to the Store:


Buffered="true"
PageSize="200"
TrailingBufferZone="10"
LeadingBufferZone="10"

following the example:

https://examples5.ext.net/#/GridPanel/Infinite_Scrolling/Overview/

The gridpanel also includes a FilterHeader plugin combined with StringFilters in ComboBox columns.
But the filtering is not working anymore. It used to work with the plugin in version 3. When I remove the Buffered option from the Store than the filtering is working.

What should I use? And what is the impact on performance?
BufferedRenderer="true" in GridPanel (default value?)
or
Buffered="true" in the Store (with TrailingBufferZone and LeadingBufferZone)

And why is the filtering not working when applying Buffered="true" in the Store?


Thanks,

Hans

PS: I'm using the Community Forum. I can not add a post to the Premium Forum. Will I get access to the Premium Forum with my new Ext.Net 5 Pro License?

geoffrey.mcgill
Sep 26, 2019, 4:32 PM
I moved your thread to the Premium forum and your account has been upgraded to a Premium member.

We will investigate your original question and post a response soon.

fabricio.murta
Sep 26, 2019, 4:54 PM
Hello @HansWapenaar!

If you add buffered="True" you are applying another kind of Buffered store; in which data is selectively pulled from the server. In that aspect, filters applied to the store will only filter whatever is currently loaded to the store.

Given you upgraded a previous version that was using just the buffered renderer mechanism, that is, all raw data in the store; and drawn to the page's DOM as you scroll around, you have all data in the store you need to filter, so local filter worked.

When you changed the store to buffered, you would also need to change the filters to remote, that is, the filters would be passed to the data fetch query, and the server will provide filtered (and paged) data to the store. So further logic would be necessary.

I believe if you want to just keep 3.x behavior, all you have to do is drop the BufferedRenderer plug in, and let the default play. If you don't change the store query logic, and it gets all data from server at once, then there's no buffered store at all.

Is that clear enough? I'm making several guesses from what you provided; if you had buffered store before, and have the corresponding queries set up and in place, there may be something wrong in the server communication/queries, or the filters not being passed at all. If that's the case, I believe we'd better handle it if you can draw a focused test case of how you are trying to set the grid up, and we can advise how to fix the specific issues with the implementation.

If that's the case, here's some guidelines on posting code samples that may come in handy; basing your sample off available examples in our examples explorers (https://examples5.ext.net/) can be a good start too.

- Tips for creating simplified code samples (http://forums.ext.net/showthread.php?61176-Tips-for-creating-simplified-code-samples)
- More Information Required (http://forums.ext.net/showthread.php?10205-More-Information-Required)
- Forum Guidelines (http://forums.ext.net/showthread.php?3440-Forum-Guidelines-For-Posting-New-Topics)

Hope this helps!

HansWapenaar
Sep 26, 2019, 5:48 PM
Hi Fabricio,

Thanks for your quick response.

I'm upgrading two different applications which contain the bufferedrenderer plugin. One with and one without the filters.

For the one with the filters, as you suggested, just removing the plugin works ok. Datasets contain up to 5.000 records only, so performance is still fine. No difference with version 3.

For the application without the filters I will apply the buffered store. Dataset is much bigger there. Data is read through a JsonPProxy. May be, when I have some more time, I will look at the option of the RemoteFilter. I realize that also sorting won't work then and has to be implemented through RemoteSorting. Checked it in the example and also there sorting on a column doesnot work:
https://examples5.ext.net/#/GridPanel/Infinite_Scrolling/Overview/

Hans

fabricio.murta
Sep 26, 2019, 7:38 PM
Hello Hans!


For the one with the filters, as you suggested, just removing the plugin works ok. Datasets contain up to 5.000 records only, so performance is still fine. No difference with version 3.

Yes, the performance should be similar at least; after all, the grid is still buffered, so the load in the browser is light just the same, rows are only (graphically) drawn to the grid as they are about to be shown in the scrolling.


For the application without the filters I will apply the buffered store. Dataset is much bigger there. Data is read through a JsonPProxy.

You get it very quickly! That's it; the proxy implementation should be carrying out the filter and sort, so the server provides the "page" (or the segment of data) with the contents according to the criteria.

You may want, though, to try the big-data approach letting it load all data at once; maybe you can still get acceptable performance even with lots of data (say, 100,000 records), all loaded client-side; it depends on the "target audience" (browsers, computer processing power on the clients, and data bandwidth). After all, with buffered rendering (not buffered store), the whole data is still stored as a simple array and only the necessary "chunk" of data is actually rendered to the grid.

I have expanded the Simple GridPanel Example (https://examples5.ext.net/#/GridPanel/ArrayGrid/Simple/) to allow an arbitrary amount of entries, and up to 100,000 records, I still get snippy performance and very low data traffic footprint (the 100k entries reports as just 40kB data in Chrome network monitor, 8MB uncompressed). Well, a single pixel moved in the scrollbar handler means some hundred records, so paging is advised to improve user experience.

If you get a really long scrollbar you may need to fix an eventual issue, we have it (as well as workaround) logged in issue #1680 (https://github.com/extnet/Ext.NET/issues/1680), just in case. But really, if you get that far on scrolling, you should consider paging or at least filtering. :)

Anyway, believing you could get the code the way you need it, I'm marking this as closed. Please let us know if you need further assistance with this thread.