Closed Bug 847019 Opened 13 years ago Closed 5 years ago

Pages load slowly after startup with LastPass enabled

Categories

(Firefox for Android Graveyard :: General, defect)

20 Branch
Other
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: dannie92, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130227155931 Steps to reproduce: I do a fresh start-up of Firefox Beta on my Nexus 7. The Firefox add-on LastPass from Mozilla's add-ons repository/AMO is enabled. I have about 280 accounts in my LastPass vault and the `Password Iterations (PBKDF2)` setting in my LastPass account is set to the recommended 5000 iterations. Actual results: Web pages won't load until about 30 seconds after the start-up. When I open a web page the loading thingy spins and the page is blank, but after about 30 seconds it shows up. Note, this only happens right after that the browser has started, after that pages load smoothly. My theory is that LastPass decrypts all my passwords right after the start-up in the same thread as the web pages are loading in, and that that forces the page loading to wait. Expected results: Pages should load faster, somehow, after a fresh start-up.
OS: Linux → Android
Hardware: x86_64 → Other
Jorge would you see if the LastPass devs have any ideas?
Flags: needinfo?(jorge)
Adding Joe from LastPass.
Flags: needinfo?(jorge)
Did this start when you increased your iterations? We don't currently have a binary component capable of running on ARM (assuming Firefox Mobile supports binary components in the first place), so everything is done in JavaScript, which can be very slow on mobile devices.
It was noticeable before when I had it set to the default 500 iterations. But it only took a few seconds, so it wasn't that big of a deal. I could change it back to 500, but on the other hand is 5000 recommended and I value my password security higher than a faster startup.
If it was taking 3 seconds before, and it's taking 30 now, then the 10x iterations bump from 500 to 5000 does sound like the likely culprit. I will look into supporting binary PBKDF2 in Firefox Mobile when I get a chance. Assuming Firefox Mobile supports js-ctypes, it may be as simple as dynamically loading libcrypto.so from the Android system, and not having to build our own binary.
I've managed to leverage OpenSSL 1.0 (included in Android 2.3+) via js-ctypes to speed up our PBKDF2 calculations several hundred times on Firefox Mobile. Feel free to try our latest pre-build: https://lastpass.com/lpp/
Amazing! I have done some testing, like restarting the browser, switch between the stable and pre-build versions and disable the addon, and it starts a lot faster with the pre-build!
Still seems a bit slow for me with the pre-build linked in comment 6, though it's much faster than before. I'm stalled for a good 15 to 20 seconds on each launch of Firefox now, when it used to be a minute or two. I have 1056 sites saved (import from a Firefox Password Manager profile that I've been using for about 17 years [since Netscape 4]). Lots of it is ancient cruft that can go away, but Firefox didn't keep track of last use time or anything so I figured I'd do that after I've been using LastPass for a few months and the "last touched: never" list gets smaller. :) It also seems to take much longer when I'm on a slow (3G, etc) link rather than wifi. Does it redownload the whole thing every time, too? I also find that Firefox gets swapped out more frequently than it used to (and it's more likely to cause other things to swap out when I run it). Does the decrypted password store use a lot of memory, too?
OK, I was guessing wrong, I just timed it and it's still about 45 seconds for me (on wifi).
fwiw, I think the impact of this wouldn't be quite so bad if there were a popup dialog to say it was downloading your LastPass data instead of just hanging the browser while it works. The actual Android app does this, but not the browser plugin.
What's the status here?
blocking-b2g: --- → tef?
Please don't flip flags that you don't understand.
blocking-b2g: tef? → ---
Apparently LastPass also causes a 50 second hang on start-up for users .... bug 973244 We really need to so *something* about this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Aaron Train [:aaronmt] from comment #13) > Apparently LastPass also causes a 50 second hang on start-up for users .... > bug 973244 > > We really need to so *something* about this. I believe LastPass 3 works better. However, the latest version available on AMO is 2.0.20, while version 3 is available on https://lastpass.com/.
I am unable to reproduce this on my Nexus 5. First, please confirm that this issue exists with the latest version of LastPass (3.1.0) that is available from our website. The version on AMO is very old and Mozilla has refused to update it.
I ran a startup profile of Fennec on a Galaxy Nexus with LastPass 2.0.20 installed. You can view it here: http://people.mozilla.org/~bgirard/cleopatra/#report=fa729bd30668097ee556faad9ae87f550cc4745a I also did the same for LastPass 3.1.0 and the results are here: http://people.mozilla.org/~bgirard/cleopatra/#report=c967ae08720599a54b11cdf62b23b8624de2c63c These profiles might have some useful information that could be used to improve LastPass startup. In both cases LastPass was the only add-on installed and I opened and closed Fennec a few times after installation before profiling.
Looking at the LastPass 3.1.0 profile, I see a few things: ------ (root) Startup::XRE_Main js::RunScript <Anonymous>() @ getlp.js:1 This call takes over 1 second ------ (root) Startup::XRE_Main js::RunScript <Anonymous>() @ getlp.js:1 js::RunScript LastPassFactory.createInstance() @ lastpass.js:1 LastPassContainer() @ lastpass.js:4 tolower Almost 200ms in tolower ------ (root) Startup::XRE_Main Timer::Fire js::RunScript LastPassContainer/this.lpMakeRequest/<() @ lastpass.js:1928 LastPassContainer/this.lpMakeRequestReal() @ lastpass.js:1928 Almost 180ms ------ (root) Startup::XRE_Main nsEventDispatcher::Dispatch js::RunScript LastPassContainer/this.lpToolbarInit() @ lastpass.js:1317 Should the toolbar code even be called for Fennec?
To clarify, are you actually seeing the 50-second hang on startup mentioned above, or are these more minor optimization recommendations? As for lpToolbarInit(), that is a generic initialization function that is necessary on Fennec.
(In reply to Andrew Zitnay from comment #18) > To clarify, are you actually seeing the 50-second hang on startup mentioned > above, or are these more minor optimization recommendations? > > As for lpToolbarInit(), that is a generic initialization function that is > necessary on Fennec. I am not seeing any noticeable lags. But I am not using the add-on either. I just installed it and profiled. I can try to use it and profile again.
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.