I am working on a process that will work with 2500 objects or more. I was curious how Telerik OpenAccess handles this large of a result set, especially when attached to the OpenAccessContext.
1 Answer, 1 is accepted
answered on 02 May 2012, 09:35 AM
OpenAccess reads the query result in chunks from the wire and creates internal representations of the data. As long as you do not iterate the query result completely (or call ToList()) we keep the server side cursor open. Only if you touch the result object, we create it and handle it to you. If the object has references or collections of references, we also only create (or load) the references objects if you touch them. After each Clear or SaveChanges call, we break those graphs so that the GC is able to free memory if necessary. This happens only if the memory is really low because we keep the data in a weak reference list which is rarely cleared by the GC. If you have bigger memory troubles, you should dispose context instances if the were data intensive asap.
the Telerik team
Follow @OpenAccessORM Twitter channel to get first the latest updates on new releases, tips and tricks and sneak peeks at our product labs!