Sanne Grinovero Yes I though about it, but this is a far greater task. There are many hashmaps in ORM metadata, but in Search we only really need to use one of these. See org.hibernate.boot.internal.InFlightMetadataCollectorImpl in particular. Also, I'm quite certain the HashMap => LinkedHashMap change won't have much of an impact in Search, but I'm not so sure about ORM, given how extensive the changes would need to be, and given these maps are not garbage collected after bootstrap in Hibernate ORM. And of course, there's also the matter of how easily this can be ported to ORM 6... I'll create a ticket in ORM and see if I can get a PR approved, but I still think a change in Search would be beneficial. About the collection copies, in Search we're talking about one copy per bootstrap here |