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

31 次查看(过去 30 天)
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 个评论
Dmitry Kaplan
Dmitry Kaplan 2021-7-21
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by