crocgui icon indicating copy to clipboard operation
crocgui copied to clipboard

Selecting a large file hangs UI

Open hmmwhatsthisdo opened this issue 3 years ago • 2 comments

Selecting a large file in the file-picker (when sending a file) causes the UI to hang for some period of time. This appears to be roughly linear to the size of the file - a 400MB file hung the UI for 3 or 4 seconds, an 8gb one has hung the UI for well over a minute.

I'm not sure if the app is reading files into memory at the time they're selected for some reason, but I would imagine this isn't desired behavior in favor of streaming files into memory as they're sent.

hmmwhatsthisdo avatar Jul 23 '22 22:07 hmmwhatsthisdo

Yeah, it's basically copying the files into the app directory so I can pass files to the croc go library. The croc libary expects files that it can find/stat/open, but android just gives me an opaque byte reading stream.

It is something that I know should be possible to fix, but I would need to change a lot to be able to pass "readers" to croc and I haven't got around to it yet.

howeyc avatar Jul 25 '22 00:07 howeyc