Greatly improved memory management by loading and analysing a limited number at a time, then calling manual garbage collection in between.