FAQ
How big is the file that you are reading? Doing many http range requests will be much slower than doing one http request and buffering locally so that you can seek. One thing that's worked for me is to kick off downloading to disk in one goroutine and just using the underlying *os.File for seeking and reading. The tricky part is when reading the file goes faster than the download, but it wasn't too hard to write a busy loop that retried the read after sleeping for a second.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 10 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 11, '15 at 4:34p
activeMar 12, '15 at 8:30a
posts10
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase