Open kofuk opened 6 years ago
In what version of Amaze are you? Can't replicate with an 9 MB file, in master, Pixel 2, Android 8.1.
I used v.3.2.1, latest release. I have the same problem on Nexus 5X, Android 8.0.1. Nexus 7 and 5X has as less as 2GB of memory. This may be the cause of the problem.
Nexus 7 and 5X has as less as 2GB of memory. This may be the cause of the problem.
I'll reopen for test in a real device.
Sounds like something I faced back in the Gingerbread days...
If you need, try play with the updated TextEditorActivityEspressoTest
in TranceLove:AmazeFileManager/verify/issue1275. So far just played with Galaxy Nexus emulator (1GB RAM) running 5.1.1 opening a 4096KB text file, loaded slow but didn't crash. But TextEditorActivity is just running standalone, so YMMV.
I'm getting OutOfMemoryException
when loading a 50Mb text file in Nexus 5x running API19. Please note, many famous file managers don't load text files over a certain size (solid explorer has a 2mb limit). I suggest doing the same.
In older versions of Amaze we had something like, loading only a limited lines in text editor first, loading more of them as user scrolled. It had it's own obvious downsides so we had to remove that implementation.
In older versions of Amaze we had something like, loading only a limited lines in text editor first, loading more of them as user scrolled. It had it's own obvious downsides so we had to remove that implementation.
AFAIK Linux has ways of doing this automatically. My Linux memory managment knowledge tells me that if we read the file from the buffer lazily the memory will not be consumed until the user scroll enough down.
It's possible, but conventional android EditText doesn't support something like this.
On Thu 28 Jun, 2018, 6:14 PM Emmanuel, notifications@github.com wrote:
In older versions of Amaze we had something like, loading only a limited lines in text editor first, loading more of them as user scrolled. It had it's own obvious downsides so we had to remove that implementation.
AFAIK Linux has ways of doing this automatically. My Linux memory managment knowledge tells me that if we read the file from the buffer lazily the memory will not be consumed until the user scroll enough down.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/TeamAmaze/AmazeFileManager/issues/1275#issuecomment-401021291, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-FsDye_h7j9R5eafRV6MWqrE-SDhUbks5uBM_GgaJpZM4UhhxS .
StackOverflow proposes loading into a ListView and dividing the text into pages to be shown in each item.
Is it possible that we use a "sliding window" method to handle big files?
What I have in mind is
What do you think?
@TranceLove We had this implementation in previous versions of Amaze. I'll find the apk . We can try to continue from there.
The app crashed on my Nexus 7(2013), Android 7.12(LineageOS)
How to reproduce
Probably, this is related to: https://developer.android.com/about/versions/nougat/android-7.0-changes#other