How can I load a mat file faster

5 visualizaciones (últimos 30 días)
Luis Garcia
Luis Garcia el 21 de Dic. de 2018
Respondida: Jan el 22 de Dic. de 2018
I have a very large mat file that is about 8 GB,it contains a couple of structure with data. And to load it it takes about 10 minutes with an SSD. Is there any other way to load it faster. I use the v.73 flag because the file was more than 2GB.
Thank you.
  2 comentarios
Walter Roberson
Walter Roberson el 21 de Dic. de 2018
How long does it take to fileread() the .mat file? The timing for that would give an indication of how much time is being spent on I/O compared to how much time is being spent decoding what is being read.
If the amount of time spent just reading from SSD is more than the number of structures times faster than decoding in load(), then you might be able to take advantage of using parfor to load() the different structures in different processes, distributing the decoding work.
per isakson
per isakson el 21 de Dic. de 2018
Are these structures complicated and have zillions of fields?
Do you use '-nocompression'?

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 22 de Dic. de 2018
You can load the file faster by using faster hardware: SSD, RAM and CPU matter. Maybe your RAM is exhausted and the computer uses theSSD as virtual memory. If you have stored the file with compression, the decompressed data might be much larger than 8 GB. Then installing more RAM will help. Or the MAT file contains user-defined objects, which need a time-consuming initialization - we cannot guess such details.

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by