Copying an object in memory is better than reopening a file