Speed up restoring a little by reading everything into memory instead of
serializing from file.