buttercup-mobile icon indicating copy to clipboard operation
buttercup-mobile copied to clipboard

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

Open jokeyrhyme opened this issue 3 years ago • 13 comments

** 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

jokeyrhyme avatar Aug 05 '20 01:08 jokeyrhyme

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.

thunsaker avatar Aug 05 '20 19:08 thunsaker

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

My environment:

  • buttercup-mobile 1.15.0
  • Google Pixel 2
  • Android 11 Beta RPB3.200720.005

ckadluba avatar Aug 08 '20 13:08 ckadluba

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

jokeyrhyme avatar Aug 09 '20 00:08 jokeyrhyme

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.

  • Oppo Find X2 pro
  • Android 10
  • Buttercup 1.15.0

aaron-neal avatar Aug 11 '20 07:08 aaron-neal

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

thunsaker avatar Aug 20 '20 04:08 thunsaker

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

jokeyrhyme avatar Aug 20 '20 04:08 jokeyrhyme

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

perry-mitchell avatar Aug 20 '20 17:08 perry-mitchell

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?

ckadluba avatar Aug 21 '20 08:08 ckadluba

@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

jokeyrhyme avatar Aug 22 '20 05:08 jokeyrhyme

@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..

perry-mitchell avatar Aug 22 '20 15:08 perry-mitchell

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 avatar Aug 22 '20 15:08 thunsaker

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):

  • Add 1 new entry (Dropbox file size increased from 890KB to 1.4MB)
  • Removed above entry (Dropbox file size increased to 2.0MB)
  • Removed an existing entry that was added when I re-saved using desktop Buttercup (Dropbox file size increased to 2.5MB)

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

  • Add 1 new entry (Dropbox file size increased from 2.5MB to 2.6MB
  • Removed above entry (Dropbox file size decreased to 841.5KB
  • Add 1 new entry (Dropbox file size increased to 841.8KB)

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.

thunsaker avatar Aug 22 '20 16:08 thunsaker

@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.

perry-mitchell avatar Aug 22 '20 18:08 perry-mitchell