haochengxia / vscode-pydata-viewer

Display PyData files (.npz .npy .pkl .pth) in VSCode.
https://marketplace.visualstudio.com/items?itemName=Percy.vscode-pydata-viewer
MIT License
17 stars 10 forks source link

warn user before opening large files #30

Open gabrieleagl opened 1 month ago

gabrieleagl commented 1 month ago

Hi,

I have some very large pickle files (1GB+). If I click on them by mistake, a python process will run to read them, and even if I close the editor straight away, the python process keeps running, using CPU and RAM.

I'd be nice to get a warning "are you sure you want to open ..." when the file is large!

Thanks for your work, G

haochengxia commented 1 month ago

Sounds good! Thanks for pointing out that the issue may cause poor user experiences. I will add a warning and enable one option to show partial content of the large file in the next version (planned to be released in the middle of Aug).

gabrieleagl commented 1 month ago

Cool, thanks!