WAAAAYY slow loading objects
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hey all,
I have a class in Matlab which contains a variety of data. The saving of this data is reasonably fast, but the loading is obscenely long. I've just loaded a 15.7mb instance of the class and it took 504 seconds.
The object is like a table that contains strings and other classes, of which are made up of strings and doubles. I make no delusion that its a lot of information cascaded within. However, I have completed other testing. I have a function that converts the file into base matlab (so other users can read my data). This strips all the "class" info and saves all the data in a struct containing strings and doubles as appropriate. I save this file and it ends up being 20.4mb, and I can load this in 0.275498 seconds.
I have no problem creating a custom loader for my class, that's not a problem, but I don't even know where to begin with this. Am I missing something fundamental here?
I'd also like to point out that I was not having this issue at all in 2012 matlab. I'm using the same code now in 2017 and am noticing dramatic performance differences.
3 Commenti
Adam
il 7 Dic 2017
Try saving using v7 instead and see if it makes any difference. v7.3 seems to not be good at all in many situations, though in my case when I was using it I was saving a huge .mat file where saving took > 40 minutes as well as loading so may be a different issue anyway.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!