Maybe locate the file in /tmp so it can be on tmpfs. Even if it is fast on SSD that seems like a useless wear on the disk.
It is in /tmp. -- Alex Bligh