Ticket S30035
Visible to All Users

Performance - Implement a CollectionSource based on a data view (e.g., XPView, IDataRecord) rather than on a collection of persistent objects

created 17 years ago
Comments (2)

    yeah, this one is too old

      I do rather a lot of XPQuery and Linq and it would be nice to get rid of all foreach loops.
      Truth is, it's not that hard to create custom collection source and will probably do it when I catch the time.
      For now, I created quick ForEach extension which quickens the work a bit.

      Answers approved by DevExpress Support

      created 11 years ago (modified 11 years ago)

      We have implemented the functionality described in this ticket. It will be included in our next update(s).

      Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

      Additional information:

      The UseServerMode Boolean property of the Options and ListView nodes is now replaced by the DataAccessMode property of the CollectionSourceDataAccessMode enumeration type. This enumeration contains the Client, Server and DataView values. The Client value is equivalent to the UseServerMode set to false in previous versions. The Server value is equivalent to the UseServerMode set to true in previous versions. DataView is a new mode. ListView in DataView mode retrieves XPView or EFDataViewlightweight read-only lists of data records without loading complete persistent objects via XPCollection/EFCollection.

      How to Choose an Appropriate Data Access Mode
      Both Server and DataView modes are intended to improve List View performance, but in different areas.
      If the database requests count is critical, then you should choose DataView mode. In this mode, all data records are fetched by a single request, and then grouping, sorting and filtering are executed on the client side without additional requests. Data iew mode is appropriate when the current persistent type contains many references to other persistent types which also include lots of references. In the DataView mode, only data required by visible columns is loaded, while other modes (both Client and Server) will trigger multiple requests to load the entire date hierarchy.
      If List View startup time is critical, then you should choose Server mode. In this mode, only a few visible objects are fetched by the first request when a List View is opened. However, scrolling, grouping, sorting and filtering leads to additional database requests - required data is loaded on demand.
      If the performance is acceptable, simply use the Client mode. Do not enable Server and DataView modes unless you observe a lack of performance.

        Show previous comments (20)
        Dennis Garavsky (DevExpress) 9 years ago

          Starting with v15.2.9, we have added an experimental support of Data View mode in Pivot Grid List Editors (PivotGridListEditor and ASPxPivotGridListEditor) and are eagerly looking forward to hearing your feedback (learn more…).

            Hi Dennis,

            Sounds promising. Does that mean that the sql issued will summarise the data to the level of summary required by the pivot. I.e. it will use the sql sum, count etc functions where appropriate instead of bringing back every row from the source table?

            Jascha

            Dennis Garavsky (DevExpress) 9 years ago

              @Jascha: By default, in this mode, all summary operations are still performed by the pivot grid control itself. The benefit of the DataView mode here is that it allows you to avoid loading entire persistent object instances. Instead, you can load only required scalar data values from the database server, including aggregate values specified via criteria expressions, which will then be processed by the visual control. As a result, you can configure a pivot table that loads and performs faster.
              The next level would be configuring the PivotGridControl component according to the WinForms Controls > Controls and Libraries > Pivot Grid > Binding to Data > Database Server Mode documentation article, which would help you achieve what you are likely looking for. While there is no built-in integration of this feature in XAF, it is still possible to implement custom-tailored solutions to get this working. For instance, an example for the PivotChart module is available at T233255. I hope this helps.

              Other Answers

              created 11 years ago (modified 11 years ago)

              Hi!

              For anyone that needs this immediate, here is a quick hacked idea how something like this can look like.

              Not approved at production, just a idea how this may work.

              Greetings Manuel

              Ps.: Create some events, mark some of them as AllDay. Go to "Event Filter". All AllDays are filtered out, and Duration is calculated server side.
              Pps: Far away from a real module, but may point some people in the right direction.

                Comments (1)
                Dennis Garavsky (DevExpress) 11 years ago

                  Thanks for sharing, Manuel.

                  Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                  Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.