JuliaIO / JLD2.jl

HDF5-compatible file format in pure Julia
Other
550 stars 85 forks source link

saving and loading a heavily nested struct [Question] #353

Closed rs7q5 closed 2 years ago

rs7q5 commented 2 years ago

I have a heavily nested struct created using TDMSReader and I have been saving the result as a single_stored_object as of late. A majority of the size of this file (over 90%) consists of a group with multiple channels of extremely long vectors that I honestly usually only need when I am post-processing, but for quick analysis I usually only need two of these groups to be loaded.

I have been thinking about breaking each of these groups into a separate object when saving the .jld2 file, but because many of my codes already require me to provide it a TDMSReader.File (since the channels are referenced accordingly), how would I go about correctly reconstructing the file since each object is to be stored in that particular structure format. I could write a function within a jldopen do loop, but is that slower than simply just using load and then storing the results back into the original structure as to not have to write all of the codes again.

rs7q5 commented 2 years ago

Nevermind, I think I figured it out a round about way to do it.