gitfs icon indicating copy to clipboard operation
gitfs copied to clipboard

Huge memory usage

Open segator opened this issue 5 years ago • 4 comments
trafficstars

It seems when opening a file with gitfs for example to copy it to another file it use a lot of memory! but only in the moment you open and read the file, or unless you use precaching I also notice if use optLocal then no memory is used.

This can somehow be fixed? I really like this lib :)

segator avatar Jun 17 '20 13:06 segator

Hey there. Can you elaborate on what exactly you are doing? and what memory usage do you see? Thanks!

posener avatar Jun 17 '20 15:06 posener

I do the gitfs.new like described in the doc and then I use the newfs.open function after this I use io.copy to copy the content of the opened file(from the gitfs) to copy it to another file. then I notice how the memory increase, with aprox the same size of the file I just copied from gitfs. same using precaching but then the memory increase when executing the gitfs.New

I can prepare a dummy example if needed, thanks :)

segator avatar Jun 17 '20 20:06 segator

Do you load it from binary? from a remote source? of from local path?

posener avatar Jun 18 '20 05:06 posener

for now remote source as binary it's failing as you see in #33

when using local path works perfect as expected with normal memory usage.

segator avatar Jun 18 '20 12:06 segator