[bug #68090] Performance improvements to classdef load-save in MAT-files

foreverallama <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #1, bug #68090 (group octave):

I did a simple timing test to check the performance improvements using the
following classdef:

classdef ExampleClass
    properties
        a
    end
end


The data was saved to a MAT-file in MATLAB. The file was saved without
compression to eliminate zlib decompression bottlenecks.

obj = ExampleClass;
obj.a = rand(3000,3000);
save('test.mat', 'obj', '-v7', '-nocompression');


This yielded the following results when loading in Octave:

% Before applying patch
octave:1> tic; load("test.mat"); toc
Elapsed time is 2.83965 seconds.

% After applying patch
octave:1> tic; load("test.mat"); toc
Elapsed time is 1.56252 seconds.


The result is roughly a 40-50% improvement in speed. The main bottleneck
addressed in this patch is preventing subsystem data from being read twice, as
the function "read_mat5_binary_file_header" runs twice during load for some
reason.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68090>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZ83zAAKCRCqLAuaBUf3
Tp1QAQDzXFVpZx8vluGqMANbL7QauAHrYpFHKTRCzQyKZGzzwwD7BQp+W2UBgBKA
cxv7BxskJQ1CeE9KEiwtzRWMpOfZcgI=
=DglR
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.