Large queries
Jan Oravec <[email protected]> Wed, 23 Jul 2008 11:38:33 +0200
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Organization | 6COM s.r.o. |
| Message-ID | <[email protected]> |
Hi, It would be interesting to decrease memory consumption with very large queries (i.e. millions to billions of returned objects), especially when returned data are processed one-by-one and thrown away (and CacheMode.Ignore is used). Currently, ICriteria.List() first loads results into List, which is then returned. First result is not usable by application before all results are loaded, increasing both latency and memory consumption. I propose conversion of all internal code paths using Lists to IEnumerable (either explicitly defining enumerator, or using 'yield return ...'). External APIs should be backward compatible (i.e. ICriteria.Enumerable() would return IEnumerable and ICriteria.List would use .Enumerable() to create List. I expect this change would greatly decrease memory consumption and latency (even for smaller queries), while very slightly increasing required CPU time. Overall single-thread throughput should be also improved, as application could process data while they are still on the way from database server. If this change is acceptable, I would be interested in working on this. Jan ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nhibernate-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nhibernate-development
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkiG/BkACgkQQy/4lyhWjrWXogCgglqce6JCgrqBgEjg70Bjpz3+ EwQAn14jVhfrGISK7FqlcuMeXRsDdQ1+ =M66N -----END PGP SIGNATURE-----