]
Sanne Grinovero reassigned HSEARCH-782:
---------------------------------------
Assignee: Sanne Grinovero
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
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.
-
If you think it was sent incorrectly contact one of the administrators: