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

조회 수: 38 (최근 30일)
cui,xingxing
cui,xingxing 2020년 6월 20일
댓글: cui,xingxing 2021년 8월 24일
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.
cui,xingxing
cui,xingxing 2021년 8월 24일
similar questions here, matfile and half inefficient storage

댓글을 달려면 로그인하십시오.

답변 (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