So what i've got.
Briefly:
It's not RAM when it comes to slow launcher.
But might be RAM indeed when it comes to 'Notes' (BTW, we have 500 mb swap).
1) Launcher really got slower and sometimes stopped responding when navigating 'Home'
Put 1500+ books (PDF, DOC mostly) on SD card (60+ gigs)
Wait for thumbnails to appear. Reboot just in case.
Open few books in a row.
At first it was steady... slower, but steady. But then when i press 'Home' button or try to navigate between 'Home', 'Books' or 'Notes' it just hangs. Sometimes it says AIRBOOK OS is not responding. At this moment ram usage didn't even hit 1 gig.
What's stranger is that after i removed all those books and rebooted device, launcher still was slow. So i had to do a factory reset. Put back 150 books and it's good so far.
2) Notes have indeed strange memory management.
As people mentioned earlier, complex editing can cause this crash:
Code:
java.lang.OutOfMemoryError: Failed to allocate a 10513164 byte allocation with 5906120 free bytes and 5MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)
at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:522)
at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:545)
at com.by.hw.drawcomponent.IByNote$BitmapDrawItem.getBitmap(Unknown Source)
at com.by.hw.util.NoteUtil.basciDrawOfNote(Unknown Source)
at com.by.hw.util.NoteUtil.basciDrawOfNote(Unknown Source)
at com.by.hw.util.NoteUtil.drawTransactionForStoring(Unknown Source)
at com.by.hw.util.NoteUtil.convertNoteFileToPng(Unknown Source)
at com.by.hw.util.NoteUtil.convertNoteFileToPng(Unknown Source)
at com.boyue.app.byreader.byhw.newbyhw.control.NotePageControl$1$1.run(NotePageControl.java:480)
at com.boyue.app.byreader.byhw.newbyhw.control.secondary.ThreadControl$1.run(ThreadControl.java:38)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
So what i did to get this:
Had 17 page notes
Edit one page: erase something, move some parts
Without saving go to another page and make some changes too
Then move back to previously edited page.
Changes i did first weren't applied. Then crash occured
I don't know how to check on memory usage in real-time so i used htop in Termux
1) I had
1.22 gb allocated before editing
2) Opened 'Notes' selected random part and moved it across the page
3) Checked on htop: RAM usage started to raise and went up to
1.32 gb then it dropped to
1.17 gb
100 megs of RAM on such change is little too much i think