Matlab 2015b花了很长时间来覆盖文件

时间:2016-04-13 06:40:12

标签: matlab save

有没有人观察到Matlab 2015b需要很长时间才能用包含嵌套表的表覆盖现有的大.mat文件。为什么会这样?

例如:

t1 = table([1:1000].');
t1.Var2 = arrayfun(@(ind) array2table(rand(5000, 20)), ...
    t1.Var1, 'uni', 0);

t2 = table([1:1000].');
t2.Var2 = arrayfun(@(ind) array2table(rand(5000, 20)), ...
    t2.Var1, 'uni', 0);

t3 = table([1:1000].');
t3.Var2 = arrayfun(@(ind) array2table(rand(5000, 20)), ...
    t3.Var1, 'uni', 0);

在我的电脑上,在新目录中:

tic;save('data_tmp_test.mat', 't1', 't2', 't3', '-v7.3');toc
tic;save('data_tmp_test.mat', 't1', 't2', 't3', '-v7.3');toc
Elapsed time is 71.284510 seconds.
Elapsed time is 433.225864 seconds.

tic;save('data_tmp_test_2', 't1', 't2', 't3', '-v7.3');toc
tic;save('data_tmp_test_2', 't1', 't2', 't3', '-v7.3');toc
Elapsed time is 73.059878 seconds.
Elapsed time is 360.631504 seconds.

tic;save('data_tmp_test_3', 't1', 't2', 't3', '-v7.3');toc
tic;save('data_tmp_test_3.mat', 't1', 't2', 't3', '-v7.3');toc
Elapsed time is 71.154672 seconds.
Elapsed time is 430.523112 seconds.

这有时只会发生,但一旦发生一次,就会非常一致地发生。我已经使用没有嵌套表的其他表进行了测试,并且在覆盖时没有出现这种行为。

0 个答案:

没有答案