Time to save mat file differs by MATLAB version

I am using MATLAB version 7.12.0.0635 (R2011a). We deploy a medium size software package that allows the user to save their project. When I save a project it takes about 5 min. Using the profiler I isolated the bottleneck to the save command. If I use the '-v7.3' switch, saving the project only takes 1 minute. I didn't see anything in the documentation that would explain this. Any ideas?

回答(1 个)

Jan
Jan 2012-3-15
Usually save -v6 is faster, because it does not compress the data - there seem to be some rare exceptions. v7.3 is required for data > 2GB. How large is your file usinge the different formats?

1 个评论

Well, I ran some tests and here are the results. I am saving the exact same project and only changing the switch on the save command.
MAT file Ver.******Save time (s)*** size (KB)
7.12.0635 (R2011a)* 268************ 11893
-v7.3 ************* 58 ************ 54354
-v7 *************** 271************ 11893
-v6 *************** 283 *********** 87911
Of course, all of these operations are being performed in MATLAB version 7.12.0635 (R2011a). I was so surprised by v7.3 that I had to run the test twice and will check again today. The file being saved has raw data and an extensive set of nested function handles several layers deep. I think all the time is required for linking. It is possible that the problem exist somewhere else in our software that indirectly relates to the speed seen here.

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Projects 的更多信息

标签

提问:

2012-3-15

Community Treasure Hunt

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

Start Hunting!

Translated by