We have a new performance bottleneck, if we use EM.find() on the same entity type 10.000 times in order to get 10.000 different entity instances. For use cases which call the EM.find() only 1000 times we cannot see a performance bottleneck.
@Entity public class EntityA { @Id @Access (AccessType.FIELD) @Column (name = "uid") private String uid; @OneToOne (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private ModelElementImpl element; @OneToMany (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private HashMap<String, List<ModelElementImpl>> mappingMap = new HashMap<>(1); } ModelElementImpl is also an entity and was not changed regarding the field structure.
Actually we cannot see any difference in the source code which can cause the bottleneck.
Do you have an idea?
I added two profiling pictures for slower and faster measurements.