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

fix(app): prevent unnecessary download of EDF/NWB data to browser #3230

Closed
wants to merge 1 commit into from

Conversation

magland
Copy link

@magland magland commented Nov 20, 2024

Recently support for viewing EDF and NWB files was added by embedding a Neurosift iframe
#3187

However I recently noticed that when navigating to such a file, the entire content of the file gets downloaded to the browser before the view is rendered. This is unnecessary (and potentially very resource demanding) as neurosift handles efficient lazy-loading of the file without downloading the entire thing.

This PR solves the issue by conditionally skipping the fetch step in the case of these file extension types.

tag: @nellh

@nellh
Copy link
Contributor

nellh commented Nov 20, 2024

@magland Thanks for the contribution but I made a similar fix based on your comment and it was merged in #3226 for inclusion in our next release. This also affected Niivue, thank you for catching the issue.

@nellh nellh closed this Nov 20, 2024
@magland
Copy link
Author

magland commented Nov 20, 2024

@magland Thanks for the contribution but I made a similar fix based on your comment and it was merged in #3226 for inclusion in our next release. This also affected Niivue, thank you for catching the issue.

Ah okay, great. I was able to set up a dev environment (for the frontend at least) so that was a plus. :)

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

Successfully merging this pull request may close these issues.

2 participants