Reduce memory consumption of EntityInfoImpl objects.

Description

Every instance of EntityInfoImpl references a LinkedList which is used to store the indexes of the entity in the projection even when ProjectionConstants.THIS was not specified in the projection fields. This can be easily avoided. We can use a placeholder in the projection array which will be replaced later in the #populateWithEntityInstance-method.

Additionally the constructor of EntityInfoImpl makes a copy of the projected values array. This is not needed as the array was just created before the call to the constructor and the array is not modified after the call to the constructor.

Environment

None

Status

Assignee

Andrej Golovnin

Reporter

Andrej Golovnin

Labels

None

Suitable for new contributors

Yes, likely

Feedback Requested

None

Fix versions

Priority

Major
Configure