Hi!
My phone literally says that it has on a moment more than 1 GB free memory.
But Total editor - built-in tool - even can't open 5 MB and 3 MB text file! WHY?
What stops it from doing this? Maybe it's time to introduce some 3rd party support lib
even maybe - but to break this unnamed limit borders? I have text files up to 8 MB
and definitely with >1GB free mem they should be easily opened inside the Editor!
Which limit is play the main role for the Editor when it opens big file?
Moderators: Hacker, petermad, Stefan2, white
Which limit is play the main role for the Editor when it opens big file?
#146217 personal license
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Which limit is play the main role for the Editor when it opens big file?
There is currently an arbitrary limit of 1.5 MB when loading files. The reason is that the loading of data into an Android edit control can only happen in the foreground thread, and takes exponentially longer with files reaching a certain size. Not only the loading takes longer, also the editing becomes incredibly slow once the file reaches a certain size. So while it would be theoretically possible to load an 8MB text file, there is a large possibility that Android would kill the app because of an ANR (Application Not Responding) error because loading the file takes more than 5 seconds, blocking the user interface. It's not possible to load the data in chunks or in a background thread.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Which limit is play the main role for the Editor when it opens big file?
Right now I found QuickEdit editor = https://play.google.com/store/apps/details?id=com.rhmsoft.edit&hl=en_US
And yes - this editor opened my files. So - this IS possible as we see! And YES - as you said - the loading process was long, but the Android did not kill anyone or anything. I just waited. Although I again do not even find a theoretical justification for these brakes. There is memory for operational use - algorithms for working with text data blocks are quite well known and have long been reliable. And here's HOW it can happen that this file opens more than 8 seconds on average? Is the load subsystem in Android and the edit control objects built-in there - editbox, ?richeditbox? really so stupidly implemented ???
And yes - this editor opened my files. So - this IS possible as we see! And YES - as you said - the loading process was long, but the Android did not kill anyone or anything. I just waited. Although I again do not even find a theoretical justification for these brakes. There is memory for operational use - algorithms for working with text data blocks are quite well known and have long been reliable. And here's HOW it can happen that this file opens more than 8 seconds on average? Is the load subsystem in Android and the edit control objects built-in there - editbox, ?richeditbox? really so stupidly implemented ???
#146217 personal license
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Which limit is play the main role for the Editor when it opens big file?
Didn't you get a warning dialog from Android that the app takes too long to respond?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Which limit is play the main role for the Editor when it opens big file?
No
#146217 personal license