The “load” and “save” functions run very slowly?

32 visualizaciones (últimos 30 días)
cui,xingxing
cui,xingxing el 20 de Jun. de 2020
Comentada: cui,xingxing el 24 de Ag. de 2021
The “load” and “save” functions run very slowly?
When I load a mat file with a size of nearly 2G, it is very slow. It takes about ten seconds to get into memory. Save is also slow. Can Mathworks provide performance for these 2 functions?
my envs:
os: windows10
memery:16G
card: nvidia 1070-8G
matlab:r2020a
cpu: i7-6700 ,8-cores
  4 comentarios
Dmitry Kaplan
Dmitry Kaplan el 21 de Jul. de 2021
Consider yourself lucky. Saving a 2.2G table with -v7.3 takes 21 minutes, basically rendering the save() command useless. There are workarounds, but they are truly ugly.
Why is Matlab so lame with this? Good question. Serialization of tables, especially to files doesn't seem to be Matlab's programmers' strong suite (just try displaying a long table -- it can take a minute for Matlab to collect its thoughts before any output appears). Additionally, 7.3-style files are more complex and writing them takes longer in general. It is a pity that parallel toolbox's presence doesn't seem to help. I hope it will get better eventually.
If your datatype supports it, fwrite()/fread() are much faster.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by