PDA

View Full Version : [FIXED] Ext 4.2.x - Infinite grid and Ext.direct duplicate pages being requested



ffanf
22 Nov 2013, 7:32 AM
Ext version tested:

Ext 4.2.2 (nok)
Ext 4.2.1 (nok)
Ext 4.2.0 (nok)
Ext 4.1.1 (nok)
Ext 4.1.0 (ok)




Browser versions tested against:

Firefox 25.0 with firebug
Chromium 30.0.1599.114 with firebug lite




DOCTYPE tested against:

n/a




Description:

This problem seems to occur since Extjs 4.1.1 with Ext.Direct
When using an infinite grid, the same pages are requested multiple times.
Once first page is loaded, the second POST to buffer additional pages actually request the same pages multiple times.
It's probably not a big deal when latency is low, but when each call takes ~4s to answer, it's better to avoid requesting duplicate pages.
Plus, if you scroll down quickly on grid with high latency queries, it will actually ask again for pages, until results are received, for example
a/ Load page 8
b/ load page 8, 9
c/ load page 8, 9, 10
c/ load page 8, 9, 10, 11
etc ... until results from page 8 are received.




Steps to reproduce the problem:

Load an infinite grid
Using an example found on the internet: http://demo.rasc.ch/eds/extjs42/infinite-scroll.html
Start firebug, and load the page
Look at the second POST request (the one corresponding to buffering of records)
See if you find duplicate pages being requested




The result that was expected:
Ext 4.1.0
[{"action":"personAction","method":"loadWithPaging","data":[{"page":2,"start":100,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":2},
{"action":"personAction","method":"loadWithPaging","data":[{"page":3,"start":200,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":3},
{"action":"personAction","method":"loadWithPaging","data":[{"page":4,"start":300,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":4}]




The result that occurs instead:
Ext 4.1.1
[{"action":"personAction","method":"loadWithPaging","data":[{"page":2,"start":100,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":2},
{"action":"personAction","method":"loadWithPaging","data":[{"page":3,"start":200,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":3},
{"action":"personAction","method":"loadWithPaging","data":[{"page":4,"start":300,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":4},
{"action":"personAction","method":"loadWithPaging","data":[{"page":2,"start":100,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":5},
{"action":"personAction","method":"loadWithPaging","data":[{"page":3,"start":200,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":6},
{"action":"personAction","method":"loadWithPaging","data":[{"page":4,"start":300,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":7}]


==> Each page requested twice


Ext 4.2.2
[{"action":"personAction","method":"loadWithPaging","data":[{"page":2,"start":100,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":2},
{"action":"personAction","method":"loadWithPaging","data":[{"page":3,"start":200,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":3},
{"action":"personAction","method":"loadWithPaging","data":[{"page":4,"start":300,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":4},
{"action":"personAction","method":"loadWithPaging","data":[{"page":2,"start":100,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":5},
{"action":"personAction","method":"loadWithPaging","data":[{"page":3,"start":200,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":6},
{"action":"personAction","method":"loadWithPaging","data":[{"page":4,"start":300,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":7},
{"action":"personAction","method":"loadWithPaging","data":[{"page":2,"start":100,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":8},
{"action":"personAction","method":"loadWithPaging","data":[{"page":3,"start":200,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":9},
{"action":"personAction","method":"loadWithPaging","data":[{"page":4,"start":300,"limit":100,"sort":[{"property":"lastName","direction":"ASC"}]}],"type":"rpc","tid":10}]


==> Each page requested three times


Thanks


Example used:
http://demo.rasc.ch/eds/extjs42/infinite-scroll.html


More details are available here:
http://www.sencha.com/forum/showthread.php?276518-Infinite-Grid-loading-the-same-page-multiple-times&p=1013115

Gary Schlosberg
22 Nov 2013, 12:02 PM
Thanks for the report! I have opened a bug in our bug tracker.

ffanf
23 Jan 2014, 12:06 PM
Hi,Any updates on bug EXTJSIV-11757 ?Thanks.

nohuhu
30 Jan 2014, 1:41 PM
The fix for this bug has been merged for 4.2.3.

Regards,
Alex.