visidata icon indicating copy to clipboard operation
visidata copied to clipboard

[load_lazy] expand options.load_lazy to work for the loading of multiple files

Open anjakefala opened this issue 2 years ago • 5 comments

Currently, options.load_lazy being set to False, results in the loading of all subsheets for embedded sheet formats like xlsx or hdf5. It would be great if it would also load all files users seperately pass to VisiData.

e.g. vd sample.tsv benchmarks.csv with options.load_lazy set to False should mean both sample.tsv and benchmarks.csv are loaded upon start-up.

anjakefala avatar Nov 13 '21 02:11 anjakefala

It would be great if you could also explicitly set this on a sheet itself. I have some sheets which are part of an indexSheet that are processor intensive and so want these loaded only on user interaction

I briefly tried MySheet.class_options.lazy_load = True and it didn't seem to work

geekscrapy avatar Nov 13 '21 09:11 geekscrapy

That should work, @geekscrapy ! Maybe try with load_lazy (I made the same mistake myself :)

saulpw avatar Nov 13 '21 16:11 saulpw

That should work, @geekscrapy ! Maybe try with load_lazy (I made the same mistake myself :)

Hmm doesn't seem to work for my sheets in the index sheet, and it doesn't look like it should: image

Maybe it should be:

image

geekscrapy avatar Nov 13 '21 18:11 geekscrapy

PR: #1193

That should work, @geekscrapy ! Maybe try with load_lazy (I made the same mistake myself :)

Hmm doesn't seem to work for my sheets in the index sheet, and it doesn't look like it should: image

Maybe it should be:

image

geekscrapy avatar Nov 13 '21 18:11 geekscrapy

It should have worked if you set it on the index sheet. Did you fix the mispelling of the option when you set it? (from lazy_load to load_lazy)

saulpw avatar Nov 13 '21 21:11 saulpw

I have tested MySheet.class_options.load_lazy = True and it does work!

anjakefala avatar Oct 10 '23 00:10 anjakefala