Although using mmap is quite convenient, reading files regularly with built-in Python routines is significantly faster.
To read in the .smv file as efficiently as possible, the file has to be read line by line and call different handlers depending on what data has been read. Instead of following a batch-reading approach (e.g. first read all mesh data, etc.), data will be accumulated while iterating over the file, eventually having read all data.
Although using mmap is quite convenient, reading files regularly with built-in Python routines is significantly faster.
To read in the .smv file as efficiently as possible, the file has to be read line by line and call different handlers depending on what data has been read. Instead of following a batch-reading approach (e.g. first read all mesh data, etc.), data will be accumulated while iterating over the file, eventually having read all data.