You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coursier runs out of memory when downloading a large file (750 MB) from a URL that ends with a slash (such as example.org/foo/).
The problem comes from Downloader#doTouchCheckFile where the implementation assumes the file content is a directory listing -- and tries to read the entire file content as a String into memory.
This could potentially be fixed by reading a file input stream instead and passing it to WebPage#listElements. On the JVM, HTML parsing is done using Jsoup, which does have support for input streams, and I assume, on binary data, it would throw a parse error early on. What would be needed for the JS backend, though?
The text was updated successfully, but these errors were encountered:
Coursier runs out of memory when downloading a large file (750 MB) from a URL that ends with a slash (such as
example.org/foo/
).The problem comes from
Downloader#doTouchCheckFile
where the implementation assumes the file content is a directory listing -- and tries to read the entire file content as a String into memory.coursier/modules/cache/jvm/src/main/scala/coursier/cache/internal/Downloader.scala
Lines 160 to 167 in ef2b102
This could potentially be fixed by reading a file input stream instead and passing it to
WebPage#listElements
. On the JVM, HTML parsing is done using Jsoup, which does have support for input streams, and I assume, on binary data, it would throw a parse error early on. What would be needed for the JS backend, though?The text was updated successfully, but these errors were encountered: