Chrome Extension freezes PC for a few seconds when data is stored on network share
Hi there,
i have noticed this problem for a while now when using the chrome extension under windows. Every time I'm unlocking 1Password using the browser extension my PC freezes for up to 5 seconds. I'm not able to move the mouse or to do anything else. Any idea?
Regards
Timo
Comments
-
Hi @Hoernsche,
How many items do you have in your data file or even an estimate would be fine? Also, what kind of CPU spec do you have in your PC?
Do you notice it more often when you have Chrome running all the time or do you restart Chrome often?
Flag 0 -
Hi Mike,
i'm having about 90 items in my data file. The extension runs on two pcs. One at home with a Intel Core2Duo E8400 running @ 3GHz and one at work with a Core i7 running @ 2.93 Ghz. I often close the Chrome window when I do not need it anymore. Another thing to mention is that at home I open the data file from a mapped network drive and at work I open it out of a True Crypt container stored on a USB stick, because DropBox is not allowed at work (I would highly appreciate a solution not based on cloud drives). To isolate the problem I moved the data files to the local disks, but that didn't do the trick. Thus, I think it must be something hidden deeper in 1password.
Flag 0 -
Hi @Hoernsche,
A local sync is in the plans for the Windows platform, we're currently testing a possible solution on OS X and if it works well, we might be able to port it to Windows.
Those CPUs are very quick, so it's not the computers. When you unlock the extension, your encrypted data has be transferred between both the 1Password extension and the main 1Password app over the local connection, so that it knows which items are in sync.
There are some bugs in Chrome itself that would peg the extension to hijack the CPU for a few seconds but since you close Chrome more often, it's probably not the cause. 90 items isn't that huge of a database either.
- Is Chrome the only browser you have or do you have Firefox that you can try to see if it does the same thing?
- You said you had this problem for a while, how long is the "while" part, does this mean it was working fine a while ago and one of the updates changed it?
Please let me know.
Thanks!
Flag 0 -
Hi Mike,
Chrome is the only browser I use regularly. Sometimes I play around with firefox. I have never noticed the same issue in Firefox, but this might be only because I am using Chrome all the time.
I can't tell you when it started, because I have set the update mechanism on the beta channel and there are so many updates from you guys. But i can tell you that a long time ago in a galaxy far far away it worked without freezing the PC :D
Another thing as far as I remember is that Chrome is not really getting closed. I believe it is still running in the background, but I can't tell whether the plugins are kept running.
Flag 0 -
You can either kill the Chrome.exe process via Task Manager or log out and back in, which will reset the processes for Chrome. See if that makes any differences.
Flag 0 -
Hi Mike,
i played a little bit with switching between the key files stored locally and on a samba share. Well it seems be the network connection after all. I thought I had the problem with the key file being stored locally too. It happens every time I have to unlock the extension. The network share is connected with 1GBit/s and performs very well. But i can see the data rate dropping down when transferring the 1password file, because there a so many tiny files.
Flag 0 -
Hi,
I'm sorry that I didn't get back to you sooner.
Unfortunately, 1Password works best locally, it's not designed to use any data file from network shares nor do we recommend/support that kind of configuration. We're working on a better way to handle this in the future but right now, it's best to leave it on the local drive, not on any network shares.
When you unlock, the app and the browser extension has to sync their data to find out the differences and merge it. In 1Password's data folder, each item is encrypted into its own file. This kind of structure makes it great for syncing tiny changes rather than the entire folder when using Dropbox to sync between your computers but for the browser and the app, that type of optimization is not available.
Flag 0 -
Hi @hoernsche,
It's not like we intentionally want it to freeze, we know it sucks and we're trying to do everything we can to optimize our syncing process.
It should get better over time as browsers become more optimized with their javascript engines, fixing bugs and adding more APis to the hardware acceleration.
Hopefully, once the browsers add the cryptographic libraries APIs with hardware acceleration, it would also stop the freezing during the sync. However, we're not waiting around, we can do this two ways, find a way to optimize it and let the browser companies do their things, that way, in time, those efforts will make the extensions heavily optimized and just as good as using the native app.
Flag 0 -
Hi Mike,
well I believe you don't want to lock up the whole system. Nevertheless it happens. As I am not into the development of browser extension I hesitate to make a too quick judgement about coding quality. However I don't believe hardware acceleration support is the only problem. I guess threading and synchronization issues are the main problem here. I do not know the possibilites for these mechanisms of javascript and all that stuff being used to develop browser extensions. Could you clarify this to help me understanding the problem you have?
Flag 0 -
Hi @Hoernsche,
You can get a sense of how it is built by reading/skimming through Google's extension guide.
We add solid crypto Javascript libraries that handles certain jobs such as encrypting/decrypting, we then use web sockets to establish a local connection to our 1Password helper, which syncs your encrypted data in both ways and we then provide CSS, html templates for the browser to render as an extension to your eyes.
All of that are occurring in the same thread for the extension, multi-threading is not yet supported for javascript extensions. All of these websocket and crypto libraries are initialized as soon as you unlock your extension, when then brings in your data to do a diff compare to make sure both side has the same database.
Multi-threading support are something browsers are working on, they're heading toward an implementation called HTML5 web workers but there's no widespread support just yet. You can learn more in this guide.
Since there is no multi-threading, at least the hardware acceleration will speed up the certain libraries, so that it doesn't lock up the extension longer.
There are a few things we can do to reduce the number of heavy method calls but that's going to take time to implement as they are radical changes that requires a lot of time and testing before we can release it.
Hopefully, those links will help. Let me know if you have more questions.
Flag 0