-
Notifications
You must be signed in to change notification settings - Fork 8
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
Performance considerations when reading through http #109
Comments
Here is something to read: https://www.baeldung.com/java-download-file |
@axtimwalde do you know the most performant why to completely load a txt file from an URL into memory? |
The |
@axtimwalde For example here in your code: https://github.com/saalfeldlab/n5-google-cloud/blob/master/src/main/java/org/janelia/saalfeldlab/n5/googlecloud/N5GoogleCloudStorageReader.java#L206 I would be worried that this code currently entails two http requests (one in line 206 and another one in line 207), just for reading a small text file. Downloading all the information in one go (if possible) might be more performant, what do you think? |
I could not find a method that does it "in one go". There seems to be always first the step of opening the
and I am getting:
More things to explore: https://stackoverflow.com/questions/309424/how-do-i-read-convert-an-inputstream-into-a-string-in-java |
Current we are using this code from
java.net
:I wonder what that actually does?
Specifically, does the
InputStream
(a) already contain all the downloaded data or (b) not?The text was updated successfully, but these errors were encountered: