This is a first part for a refactor to be able to load the elements in memoy and sort them without using as much RAM as we are currently doing
Changes proposed in this merge request:
This merge request, when approved, will close: