[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-782) Unnecessary loading of @ContainedIn entities causes big performance hit
Sanne Grinovero (JIRA)
noreply at atlassian.com
Tue Aug 9 17:04:02 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanne Grinovero updated HSEARCH-782:
------------------------------------
Fix Version/s: 4.0.0.Alpha2
> Unnecessary loading of @ContainedIn entities causes big performance hit
> -----------------------------------------------------------------------
>
> Key: HSEARCH-782
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-782
> Project: Hibernate Search
> Issue Type: Bug
> Components: engine
> Affects Versions: 3.4.0.Final
> Environment: Hibernate 3.6.3
> MS SQL Server 2005
> Reporter: Adam Harris
> Assignee: Sanne Grinovero
> Fix For: 4.0.0.Alpha2
>
> Attachments: log4j.properties, optimizations.zip, org.hibernate.search.test.engine.optimizations.CollectionUpdateEventTest2-output.txt
>
>
> This bug is somewhat related to HSEARCH-679 where I have added some comments.
> Here is a simplified model:
> {code:title=A.java|borderStyle=solid}
> public class A {
> @Field
> private String name;
> @ContainedIn
> private Collection<B> b;
> }
> {code}
> {code:title=B.java|borderStyle=solid}
> @Indexed
> public class B {
> @Field
> private String name;
> @IndexEmbedded
> private A a;
> }
> {code}
> The basic problem is that every time a new instance of B is created and added to A's collection, all of the B instances in that collection have their index recreated. The reason this is a problem is that nothing in A has changed (e.g. the "name" field). There is no new information to add to all of the B indexes. As the number of objects in the collection grows, this becomes are real performance hit.
> It seemed like HSEARCH-679 was trying to address this problem, but this may be a little different scenario.
> I'm attaching some sample code and my log file that demonstrates the extra index events. Please see line 519 of the surefire log file.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list