strange problem with dds (episerver 9 bug?)

Vote:
 

I'm using episerver cms v. 9.7.2. I've a dds table with thousands of items. When I request the items from the store and try to convert them to list the CPU goes to 100% and the process takes a long time to run. In version 8 I did not have this problem. The project was originally developed on version 8 and then migrated. I've done a lot of tests and came to the conclusion that there may be a bug, because the behavior varies greatly by using different code on the same data.

Example: this is the entity:

  [EPiServerDataStore(AutomaticallyCreateStore = true, AutomaticallyRemapStore = true)]
    public class myItem: IDynamicData
    {
        public Identity Id
        {
            get;
            set;
        }
        public int umbracoNodeID { get; set; }
        public String nodeTitle { get; set; }
        public string url { get; set; }
    }

This is the code:

var y = from item in store.Items() select item; 
var z=y.ToList();

this list with 3000 items spends about 3 seconds to execute .ToList() method (very slow....)

if I retrive items with this code, execution time is only 30ms!!!

       var y = from item in store.Items()
                    select new
                    {
                        umbracoNodeID = item.umbracoNodeID,
                        url = item.url,
                        Id=item.Id,
                        nodeTitle= item.nodeTitle
                    };
            var z = y.ToList();


the data are the same, the class attributes are the same, the execution time went from 3000ms to 30ms.
What is the problem ? First code is formally correct. I think that the problem is in the implementation of the iDynamicData class, but do not know how to find the problem, because in the second example creates a list of anonymous objects and the problem does not occur. 
The big problem is that there are third-party modules, such as "bvnetwork 404 handler" that uses the same technique. I use 404 handler to manage the redirect pages from old to new url, importing thousands of conversion records from an xml file. When the pool is recycled, before the site appears to spend several minutes, just because of the loads of this large amount of records read from dds, they probably are previously loaded into memory.
I download source code from github, and I saw that the table is converted to dds list before being processed, with .ToList() method. There is a workaround for this problem without having to radically modify the third-party code?

thanks
Diego

#145694
Mar 10, 2016 9:01
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.