[DevExpress Support Team: CLONED FROM Q558707: How do I prefetch related details data to increase performance for calculated fields]
Dear Dennis,
we improved the loading performance for our application using Prefetch similar as described here.
You mentioned here: "Take special note that this code affects only initial loading and we do not have a good solution for the scenario when the ListView is refreshed via an Action or in code in an XAF Web application."
So that worked well for people using the windows application using UIType SingleWindowSDI, because each load is an initial load and Reload is not used.
However we have now the case, that people want to use the TabbedMDI mode and then they are using the Refresh Action.
While inital loading for example was improved to 6 seconds loading time, the Refresh takes about 30 seconds or longer.
We did analyse the queries using XpoProfiler and put a breakpoint into the PreFetch code.
PreFetch code is executed, only if the ListView is newly opened from the NavigationItem.
Refresh iterates trough all shown shown records and executes by far more queries resulting in the slow loading time.
So the question would be, could we provide a custom Refresh for some ListViews, so that it would use the same loading, as happening inital from the NavigationItem?
You find attached a screen recording, where we first click on the Orders NavigationItem for inital load, which takes 6 seconds, then we click Refresh, which takes till the end of the screen recording (much longer).
If we first remove the filter, then Refresh and after that we add the filter back, the total loading time is the same like the Refresh.
It is fast only with the loading from NavigationItem.
We also attached the logs from XpoProfiler for both cases.
Thank you very much ahead