Avoid unnecessary memory allocations on entity updates

Description

Three problems:

  1. Upon calling org.hibernate.search.mapper.pojo.work.impl.AbstractPojoTypeIndexingPlan#update(java.lang.Object, java.lang.String, java.lang.Object, java.lang.String...), we create the entity state even if none of the dirty paths are relevant to indexing.

  2. We store all dirty paths in org.hibernate.search.mapper.pojo.work.impl.AbstractPojoTypeIndexingPlan.AbstractEntityState#dirtyPath. We should only store paths relevant to indexing.

  3. Upon updates to a property that’s irrelevant for indexing, we create an indexing plan anyway. We should not.

Environment

None
Fixed

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major