why is 'gather' performance dramatically poor when I evaluate a tall array (105151 Bytes) by an indexing operation
Show older comments
Hi experts,
I have a tall array from type double (Mx386) containing voltage values in each .
For visualization purposes I want to evaluate the first values of one electrode, but this single process took 5 h.
test1 = gather(test(1:500,3));
Also evaluating the tall array to get size is a time consumpting events
gather(size(test,1))
How can I accelerate the process? What could likely be the issue?
I'm happy about any hint to solve this.
Thank you in advance!
Eva
6 Comments
Walter Roberson
on 19 Jul 2019
Roughly how large is M?
Is test input data or is it transformed data? Because if it is input data then there might be ways to read fewer columns.
Eva-Maria Weiss
on 19 Jul 2019
Walter Roberson
on 19 Jul 2019
That would be an interesting test but it is not what I mean.
I suspect that when you gather like that, it forces matlab to go through reading all columns of the array (in batches of rows) and extract the used columns from that. It would, however, be faster to tell the underlying datastore to read only the columns needed
https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.tabulartextdatastore.html
And see SelectedVariables property or use * in the TextscanFormats property
(We know that you do not have a xls or xlsx spreadsheet for your data because those cannot have as many rows as you are using.)
Eva-Maria Weiss
on 19 Jul 2019
Walter Roberson
on 19 Jul 2019
That's why I asked "Is test input data or is it transformed data?"
Eva-Maria Weiss
on 22 Jul 2019
Edited: Eva-Maria Weiss
on 22 Jul 2019
Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!