buttercup / buttercup-mobile

:iphone: React-Native mobile application for Buttercup
https://buttercup.pw
GNU General Public License v3.0
392 stars 70 forks source link

possible performance / poor speed / out of memory issue on Android app 1.15.0 with Android 11 beta #245

Open jokeyrhyme opened 4 years ago

jokeyrhyme commented 4 years ago

Describe the issue you're having

possible performance / poor speed / out of memory issue on Android app 1.15.0

I have ~150 Documents across 14 Groups in a Google Drive vault

This takes maybe 3 or 4 seconds to decrypt in the Firefox extension on my 2016 MacBook Pro

Lately, however, I have been getting an "Out of memory" error message (in a sort of red banner that animates in from the top of the screen that seems to be part of the app, but maybe its the OS), but this is after waiting 5 minutes for the vault to decrypt

It does sometimes successfully decrypt just before the 5 minute mark, but this seems to be quite rare

I definitely don't remember poor performance being a problem when I first started using Buttercup, and I assume this is because I'm running the Android beta, but I switched around the same time as 1.15.0 was published so it's hard for me to tell

I figured I report this just in case others have data points that help rule this out either way

What OS version are you using

Android 11 Beta 2

What device are you using

Google Pixel 4 XL

thunsaker commented 4 years ago

I've been having issues since mid-july: https://twitter.com/thunsaker/status/1284031829842857984

I was able to reproduce the out of memory error building from source.

Also, happy to help out with the project, but I don't have much experience with React.

ckadluba commented 4 years ago

I also have this issue since a while. Unlocking the vault takes very very long (> 1 minute) most of the time.

My environment:

jokeyrhyme commented 4 years ago

I wonder if the Android beta has extra instrumentation or other development features (not necessarily the user-visible Developer Mode) enabled that impact JavaScript execution performance?

If so, I would expect these to go away when the release candidate is or stable Android 11 is released

I haven't got my system set up for this yet, but I am curious to see if there is any output from adb logcat whilst unlocking vaults that might help us understand what is happening

aaron-neal commented 4 years ago

I seem to be experiencing this "out of memory" issue also. The performance is too slow during an autofill unlock that I keep the archive open and switch apps.

thunsaker commented 4 years ago

Relevant info from Buttercup's Twitter: https://twitter.com/buttercup_pw/status/1296160411235028994?s=19

jokeyrhyme commented 4 years ago

Ah, so this: https://github.com/buttercup/buttercup-core/issues/287#issuecomment-676477411

perry-mitchell commented 4 years ago

Would someone be able to confirm if this is still an issue on 1.15.1? It should be resolved if it is indeed related to buttercup/buttercup-core#287

ckadluba commented 4 years ago

Hi @perry-mitchell! That sounds great. Thank you for investigating and fixing this.

Unfortunately I have no setup to build the APK for the latest version and 1.15.1 cannot be installed over the play store yet (or at least my phone does not get the update). Where can I get the APK for 1.15.1?

jokeyrhyme commented 4 years ago

@perry-mitchell howdie, I just checked, and 1.15.0 is the latest for me when I access the Play Store, there's no update offered so far

perry-mitchell commented 4 years ago

@ckadluba @jokeyrhyme Google Play notified me that it was a full rollout of 1.15.1.. So I'm not sure what the delay is. Any idea @sallar?

It should be available soon at least..

thunsaker commented 4 years ago

After opening and re-saving on the desktop version. My archive went from ~90MB down to a measly 890KB.

I was able to get the latest version (v1.15.1) on an iOS device (iOS 14 beta 4). My Dropbox archive opened promptly without issue.

I'll get out my laptop later, get latest, build from source, and run on Android. I still haven't been able to get the latest version from the Play Store.

thunsaker commented 4 years ago

Alright here's what I found.

Building latest from source (v1.15.1) and running on a Pixel 2 (Android 10): I am able to unlock/save/etc. my Dropbox archive without issue.

Tests on Android 10 (built from source):

Tests on iOS 14 beta 4 (Production version 1.15.1):

It sure looks like, while Android is working (unlock/save/etc.) on 1.15.1 it is still increasing the file size more than I think it should and will eventually fail again due to a large file size.

@perry-mitchell let me know if you need additional help pinpointing the issue, I'm all set up to test on both platforms and have some familiarity with React Native.

perry-mitchell commented 4 years ago

@thunsaker Thanks a lot for the detailed write up, and for diving in to the source yourself. It does sound like either something is wrong on the android side, or you're Buttercup core version simply isn't up to date (or something is being cached). They both use the same React Native source, which point to the same core library, which should work identically on both platforms.

We'll do some testing on an android phone tomorrow to check just this.