BoostIO / boostnote-mobile

Boostnote for iOS and Android 🚀
https://boostnote.io/
MIT License
816 stars 157 forks source link

Android app is excruciatingly slow... #105

Open PhiLhoSoft opened 6 years ago

PhiLhoSoft commented 6 years ago

Hello

I came to Boostnote, from Simplenote, and from OneNote before that... 😄 What pleased me, beside the nicely written articles on Medium 😉 was:

Anyway, I made some notes (copy / paste / improve from Simplenote) on the desktop app, and I wanted to edit a medium-sized note (around 10,000 chars) on my phone. I grant you, it is a low-end phone, already old when I bought it: a Wiko Darkside running Android 4.2.1... But most apps work rather well on it. At worst, I have, sometime, very slow typing in Quora (in browser) or Instagram (in app), but not always.

So I launched Boostnote, selected Dropbox from All notes (because All notes only shows two placeholder notes "Tap here and write something"), selected my note. It opened at the end, so I scrolled up to a third of the text length, to reach the place where I have to type. Already a problem: scrolling is veeery slow. Sometime, I have to move my finger 2 or 3 times before its scrolls... OK, reached my point, I remove some stuff and start to type. Ouch! What I type is displayed after 1 to 5 seconds... per letter! I wondered if it was my phone being slow. I closed some apps, I went to Firefox, then to JsFiddle where I could type a sentence at normal speed. I copy it to paste it in BN. But when I started it again:

A rather bad experience, if I can say so. Not sure if that's a problem with ReactNative, with CodeMirror, or some other layer, but for me, the app is just not usable, which reduces considerably the interest of BN, alas.

Note: preview scrolls at normal speed. But has another bug, which I will fill separately.

PhiLhoSoft commented 6 years ago

Update: I took a look at the Cson files, and I was surprised to see that half of the files has all the text in one line. These have quoted properties, with single quote, and single quote to delimit the values too. The other type uses double quotes to delimit values (doubled double quotes for content), and unquoted properties.

I investigated, and it appears that the desktop application saves notes in the latter format (readable) while the app saves them in the former format (which is bleh). Plus the app saves a note after it has been opened, even if it has not been modified (the desktop doesn't seem to do that).

But the big slow down seems to come from the size of the file: in a small note (< 300 chars), typing goes at normal speed. Perhaps there is an accidental quadratic operation (string concatenation in a loop?) happening somewhere in the code?

Moreover, looks like my unsuccessful attempts at scrolling a non responsive page messes the text! To reproduce this, I pasted my issue above in a note, and pasted one of your articles above, so it makes a rather long note... I made attempts at scrolling, I wonder if it does small drag'n'drops... Anyway, here is an excerpt of the resulting text:

So I launched Boostnote, selected Dropbox fromSometime, All notes (because All notes only shows two placeholder notes "Tap here and write selected my note. It opened at the end, so I scrolled up to a third of the text length, to reach the place where I have to type. Already a problem: scrolling is veeery Iclosed have to move my finger 2 or 3 times before itsit scrolls... OK, reached my point, I remove some stuff and start to type. Ouch! What I type is displayed after 1 to 5 seconds... per letter! I wondered if it was my phone being slow. I some apps, I went to Firefox, then to JsFiddle where I could type a sentence at normal speed. I copy it to paste it in BN. But when again:I started it

Can you see the "typos"? I have not changed this text myself...