Slow unlock (5-10 seconds) in Chrome 1PW X, but fast in native 1PW app on same Mac

hattrick
hattrick
Community Member
edited September 2018 in 1Password in the Browser

Unlocking via 1PW X is annoyingly slow (5-10) seconds, but doing so in the native app is almost instantaneous.

This is in Chrome Version 69.0.3497.100 (Official Build) (64-bit), and is not affected by restarting Chrome or rebooting the machine.

Machine specs are:

MacBook Pro (13-inch, 2016, Two Thunderbolt 3 ports)
Processor 2 GHz Intel Core i5
Memory 8 GB 1867 MHz LPDDR3
Graphics Intel Iris Graphics 540 1536 MB

That seems like plenty of power, and this happens even when the machine is lightly loaded.

Is this expected? What is the cause? Can it be sped up? Is there more diagnostic information I can provide?

Note that this has been the case since switching to 1PW X several months ago. It's not an artifact of a recent upgrade or anything like that.

Thanks!


1Password Version: 1Password Version 6.8.8 (688001) Mac App Store
Extension Version: 1.10.4
OS Version: MacOS 10.13.6 High Sierra
Sync Type: 1Password Account
Referrer: forum-search:slow unlock

Comments

  • AGAlumB
    AGAlumB
    1Password Alumni
    edited February 2019

    @hattrick: Indeed, I'm sorry for the trouble. Native code is always going to be faster than something — like 1Password X — running solely in Javascript in the browser. That can't be helped. But we're always working to find ways to make it more efficient, and browser changes help over time too.

    However, it was faster in 1.10.3, so we're looking for the cause of the delay in 1.10.4 — or perhaps a new optimization that needs to be made. Thanks for bringing it up!

    ref: x/b5x#590

  • hattrick
    hattrick
    Community Member

    Out of curiosity, what is going on that takes 5-10 seconds? Is it decryption implemented in Javascript? Is the slowness expected to be proportional to the size of my vault? If I were to move the 90% of items I use only rarely to some other vault would that make a difference?

  • AGAlumB
    AGAlumB
    1Password Alumni

    @hattrick: Yes. Literally everything happening in 1Password X is code running within the browser sandbox. Its a good question about items/vaults though. Frankly I'm not sure. I don't believe that should make a huge difference since it isn't decrypting everything all at once anyway, but on demand when displayed/accessed. But certainly it could add up. I'm using a few accounts and about a dozen vaults here, give or take in different browsers/machines and haven't noticed a difference — other than the fact that some of my devices have more speed than others. I'm always amazed that we got this working in the first place, since 1Password.com crypto is no joke, much more complex than local vaults. But at the same time we've made optimizations over time that have improved speed dramatically, so I suspect there's still room for more speed — even apart from addressing the issue in 1.10.4.

  • hattrick
    hattrick
    Community Member

    Thanks. It's a sad comment on the state of computing that despite 30 years of Moore's law, things that were fast in a terminal in 1988 are slow in a browser in 2018...

  • AGAlumB
    AGAlumB
    1Password Alumni

    @hattrick: Seriously? This stuff wasn't possible in 2008, much less 1988. Certainly not in a browser. We were only able to even release 1Password.com originally when we did because browsers were just getting this stuff. We've got so much cool technology now, I just can't imagine being sad about any of it. :chuffed:

  • hattrick
    hattrick
    Community Member

    This isn't a criticism of 1Password at all - it's a comment on the fact that while computers got many times faster, software got many times slower because of the layers upon layers upon layers from which it's now constructed. Whatever computation it is your Javascript is doing would probably an order of magnitude faster if you could write it in C++ and run it directly on the underlying hardware. Instead you have to write it in interpreted Javascript running in a sandbox in a browser on top of who knows how many layers of virtualization, because that's how computers are now. This is what you, and everyone else, has to work with. There are reasons for all that, sure, but it comes at huge expense.

  • AGAlumB
    AGAlumB
    1Password Alumni

    This isn't a criticism of 1Password at all - it's a comment on the fact that while computers got many times faster, software got many times slower because of the layers upon layers upon layers from which it's now constructed.

    @hattrick: Oh totally! I feel you. I'm just saying that a lot more is possible as a result, with 1Password, but also with technology in general. I think there's a lot to be optimistic about. :)

    Whatever computation it is your Javascript is doing would probably an order of magnitude faster if you could write it in C++ and run it directly on the underlying hardware. Instead you have to write it in interpreted Javascript running in a sandbox in a browser on top of who knows how many layers of virtualization, because that's how computers are now. This is what you, and everyone else, has to work with. There are reasons for all that, sure, but it comes at huge expense.

    Haha absolutely! And that's why we've got world-class native apps, and no plans to go browser-only. ;) But a lot of folks out there can't run our native apps, because they're on Linux, Chrome OS, or restricted company computers; so 1Password X fills a huge need for them. And, fortunately, with browser advancements and our own efforts, we can make it speedier, even if it will never get the raw performance of native code. Cheers! :)

This discussion has been closed.