GlobalDataverseCommunityConsortium / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
13 stars 38 forks source link

Add Logic/Message for Files too large to be previewed well #34

Open djbrooke opened 4 years ago

djbrooke commented 4 years ago

We're testing a few larger files on Harvard Dataverse and they are not loading in the previewers:

I linked two PDFs above, but there are files of different types that this also happens for.

I was hoping we could edit the existing error message to include some words about the file being too large, but it never loads enough to view it.

We could consider a pre-load check on file size before attempting to load a preview, and instead show a message that the file is too large to preview, or something else.

Suggestions welcome!

qqmyers commented 4 years ago

Hmm - both ~work for me. The first showed up after ~2 minutes. The second took more like 5 minutes and displayed some lines of the file before showing the script paused and a 'Paused before potential out-of-memory crash' message in the console.

image

My guess, if you're not seeing the error with an HTTP status code is that the download works and it is then some memory limit on the local machine/browser that is the issue. (might be worth checking the browser console though). If that's the case, it may be hard to set a good limit for all previewers - they could vary in how much memory they require for a given size file (e.g. a video player will stream).

Options I can see:

In any case, problems like this could be used to drive previewer advances - there are certainly spreadsheet viewers that incrementally load data rather than retrieving and parsing the whole file to start. If there are enough GB spreadsheets, I'm sure they could be handled with some additional work.

TaniaSchlatter commented 3 years ago

I ran into this when trying to preview this file. I'm very interested in a progress indicator for previews. People will wait if they know something is coming.