|
From: NHibernate J. <mik...@us...> - 2007-01-10 18:36:32
|
Improve SubselectFetch performance
----------------------------------
Key: NH-859
URL: http://jira.nhibernate.org/browse/NH-859
Project: NHibernate
Type: Improvement
Components: Core
Versions: 1.2.0.Beta3
Reporter: Sergey Koshcheyev
Priority: Trivial
Fix For: LATER
http://forum.hibernate.org/viewtopic.php?p=2336860#2336860
SubselectFetch constructor takes a relatively long time to execute.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <mik...@us...> - 2007-02-07 06:39:25
|
[ http://jira.nhibernate.org/browse/NH-859?page=all ] Ken Tong updated NH-859: ------------------------ Attachment: NH-859.diff This is my first patch. It may not improve sufficiently but I hope this helps. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: LATER > Attachments: NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-02-07 07:41:30
|
[ http://jira.nhibernate.org/browse/NH-859?page=comments#action_14981 ] Ayende Rahien commented on NH-859: ---------------------------------- Just to note, those methods exists only for .Net 2.0 We may want to think of something appropriate for .Net 1.1 > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: LATER > Attachments: NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-02-07 09:17:54
|
[ http://jira.nhibernate.org/browse/NH-859?page=all ] Ken Tong updated NH-859: ------------------------ Attachment: NH-859 CompareInfo.diff This patch make use of CompareInfo which works on both 1.1 and 2.0. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: LATER > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-02-07 11:28:24
|
[ http://jira.nhibernate.org/browse/NH-859?page=all ] Sergey Koshcheyev updated NH-859: --------------------------------- Fix Version: (was: LATER) 1.2.0.CR1 type: Patch (was: Improvement) > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-02-07 11:47:24
|
[ http://jira.nhibernate.org/browse/NH-859?page=comments#action_14987 ] Ayende Rahien commented on NH-859: ---------------------------------- Applied, now we need to test that this truly solves the issue. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-02-07 15:15:38
|
[ http://jira.nhibernate.org/browse/NH-859?page=all ] Sergey Koshcheyev closed NH-859: -------------------------------- Resolution: Fixed Notified the original forum poster. I'm closing this and we can re-open it if the problem remains or reappears. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-03-04 17:13:27
|
[ http://jira.nhibernate.org/browse/NH-859?page=all ] Sergey Koshcheyev reopened NH-859: ---------------------------------- Wasn't fixed. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-03-05 08:26:37
|
[ http://jira.nhibernate.org/browse/NH-859?page=comments#action_15200 ] Ken Tong commented on NH-859: ----------------------------- >From Almas' example, only 1 call to Loader.CreateSubselects(). But it ends up creating 1000 SubselectFetch instances. Digging deeper to the source code find out the 1000 instances are identical. In fact, there is only 1 sub-select in the generated SQL SELECT. Would we create only 1 SubselectFetch? How about replace /////////////////////////////////////////////////// foreach (EntityKey[] rowKeys in keys) { for (int i = 0; i < rowKeys.Length; i++) { if (rowKeys[i] != null && loadables[i].HasSubselectLoadableCollections) { SubselectFetch subselectFetch = new SubselectFetch( //getSQLString(), aliases[i], loadables[i], queryParameters, keySets[i], namedParameterLocMap ); session.BatchFetchQueue.AddSubselect(rowKeys[i], subselectFetch); } } } /////////////////////////////////////////////////// with /////////////////////////////////////////////////// SubselectFetch[] subselectFetchCache = new SubselectFetch[loadables.Length]; foreach (EntityKey[] rowKeys in keys) { for (int i = 0; i < rowKeys.Length; i++) { if (rowKeys[i] != null && loadables[i].HasSubselectLoadableCollections) { SubselectFetch subselectFetch = subselectFetchCache[i]; if (subselectFetch == null) { subselectFetch = new SubselectFetch( //getSQLString(), aliases[i], loadables[i], queryParameters, keySets[i], namedParameterLocMap ); subselectFetchCache[i] = subselectFetch; } session.BatchFetchQueue.AddSubselect(rowKeys[i], subselectFetch); } } } /////////////////////////////////////////////////// It's only an idea. I tried the current unit tests and they don't smell bad. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-03-05 08:28:33
|
[ http://jira.nhibernate.org/browse/NH-859?page=comments#action_15201 ] Ken Tong commented on NH-859: ----------------------------- I forget the tell the source. It's Loader.CreateSubselects(IList keys, QueryParameters queryParameters, ISessionImplementor session) > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-03-05 09:21:40
|
[ http://jira.nhibernate.org/browse/NH-859?page=comments#action_15202 ] Sergey Koshcheyev commented on NH-859: -------------------------------------- Applied, thanks. Hopefully we'll get it this time. > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-04-04 12:04:54
|
[ http://jira.nhibernate.org/browse/NH-859?page=all ] Sergey Koshcheyev closed NH-859: -------------------------------- Fix Version: 1.2.0.GA Resolution: Fixed Should be fixed in 1.2.0.GA > Improve SubselectFetch performance > ---------------------------------- > > Key: NH-859 > URL: http://jira.nhibernate.org/browse/NH-859 > Project: NHibernate > Type: Patch > Components: Core > Versions: 1.2.0.Beta3 > Reporter: Sergey Koshcheyev > Priority: Trivial > Fix For: 1.2.0.GA, 1.2.0.CR1 > Attachments: NH-859 CompareInfo.diff, NH-859.diff > > http://forum.hibernate.org/viewtopic.php?p=2336860#2336860 > SubselectFetch constructor takes a relatively long time to execute. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |