Reserve the space in memory before appending the elements
See hotspot reports from attaching hotsport to a CPU hogging akonadi_imap_resource process
PS: I still need to understand why the file access is also super weird in term of CPU usage