How does Matlab editor exactly open compressed (-V7) files

We are coding an application using the csmatio.dll
We want to compare performance in opening mat file between our app and the Matlab 2015R Editor
When Matlab Editor opens a compressed (V7) file, does it decompress the entire structure before displaying it in the Workspace or does each sub array is decompressed when needed ?
Thank you,

2 Comments

The editor does not open MAT files, but only the source files, which are uncompressed text files.
Do you mean the load command?
Yes, I meant the load command
Thank you for your answer

Sign in to comment.

 Accepted Answer

As @Jan indicated, the MATLAB editor does not load .mat or .fig files.
load and openfig always load the entire variable into memory.
openvar and workspace() https://www.mathworks.com/help/matlab/ref/workspacebrowser.html only work on variables already loaded into memory.
The tools for loading that do not load all variables into memory immediately are matfile
It is not documented as to whether using whos with -file option decompresses the entire file into memory, or if load with a list of variables decompresses everything into memory first. However, we can tell by system response time that asking for information about what is stored in a .mat file does not require decompressing the entire file into memory. For example it is possible to generate symbolic expressions that are only a few kilobytes compressed but which take a couple of hours to decompress into memory; whos -file and load() with variables excluding those ones do not get loaded down for those hours.

More Answers (0)

Categories

Products

Release

R2015a

Community Treasure Hunt

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

Start Hunting!