Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails if file too big? #153

Closed
AJamesPhillips opened this issue Nov 23, 2023 · 4 comments
Closed

Fails if file too big? #153

AJamesPhillips opened this issue Nov 23, 2023 · 4 comments

Comments

@AJamesPhillips
Copy link

Hi, I love this tool. Really great. Thank you. When I open a small file it works fine but with larger files it doesn't seem to load the extension command UI buttons:

Cursor_and_2019Q4_csv_—_housing-data

The rainbow colours for the file contents renders fine (as you can see above) so the file must have been read and parsed ok.

The files in question are from here: https://statistics.gov.scot/data/domestic-energy-performance-certificates and are about 50Mb each so not that large. If I make a subset of the file it works fine. I thought it might be some bad character which might be breaking the extension but then the rainbow colours work so I don't know.

@mechatroner
Copy link
Owner

Thanks, I appreciate the feedback! There is a VSCode limitation unfortunately that prevents extension access to files larger than 50 MB, see microsoft/vscode#31078, Rainbow CSV just can't see such files. But highlighting does work apparently because it is implemented as a separate texmate grammar file.

@mechatroner mechatroner transferred this issue from mechatroner/rainbow_csv Nov 24, 2023
@AJamesPhillips
Copy link
Author

Thanks so much for the speedy reply @mechatroner ! Do you think it would be possible to show a message in the logs or something for the user to know the extension has not loaded due to the large file size?

@mechatroner
Copy link
Owner

I've subscribed to the VSCode issue I linked to know if there are any API updates to handle this situation better. Currently, big files are completely hidden from extensions - there is no reliable way to request big file size, filename, extension, filetype, etc. So there is no way to show the message in the UI, and I don't think logging something to the debug log would have a lot of value (and again it won't probably be precise enough)

@AJamesPhillips
Copy link
Author

Ah got it. Thank you. Ok I'll close this. I hope they improve the API around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants