Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

[NHibernate-development] Large queries

Jan Oravec

2008-07-23

Replies: Find Java Web Hosting

Author LoginPost Reply
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


Attachment: signature.asc (zipped)
-------------------------------------------------------------------------
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
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.