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

Huge memory usage #32

Open
segator opened this issue Jun 17, 2020 · 4 comments
Open

Huge memory usage #32

segator opened this issue Jun 17, 2020 · 4 comments

Comments

@segator
Copy link

segator commented Jun 17, 2020

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 :)

@posener
Copy link
Owner

posener commented Jun 17, 2020

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

@segator
Copy link
Author

segator commented Jun 17, 2020

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 :)

@posener
Copy link
Owner

posener commented Jun 18, 2020

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

@segator
Copy link
Author

segator commented Jun 18, 2020

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.

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

No branches or pull requests

2 participants