Why is Optimize Database option needed instead of doing it automatically?

Options
Abhijit
Abhijit
Community Member
edited July 2019 in 1Password 7 for Windows

Why we do not do this automatically and provide an option to user to run it? Why a user should do it and what way he is concerned with databases and optimizing it?

Thanks,
Abhijit


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • MikeT
    Options

    Hi @Abhijit,

    Thanks for writing in.

    That's a great question. The reason we do not do it automatically is because this causes unexpected behavior for users when it is running in the background automatically. Imagine you are trying to fill in or save a new Login item but it doesn't do anything because it's busy optimizing your database in the background, it prevent any changes while it is doing its job. Once it is done, suddenly, the thing you wanted shows up; this isn't a good experience.

    This option basically optimizes your database by telling the internal database tool to "de-fragment" itself, so it can compressed rarely used data (its data used to organize the data it keeps, not 1Password or your data), remove any old temp tables it used to organize itself and more. It is basically recreating the entire database, so it's fresh and new and ready for more data. For users with a lot of data, this can take several seconds to minutes to finish, thus we don't want to do it randomly in background. For majority of users, this is not needed.

    We would only recommend using this feature when you're seeing 1Password is starting slower than usual but beside that, normal operations aren't impacted by keeping the database as is since the database does a great job of minimizing this issue for you anyway.

    PS: I've moved this to our general Windows forum as this isn't specifically a beta issue.

  • Abhijit
    Abhijit
    Community Member
    Options

    I do not agree to the first para. We should be determining the the correct time of running this process automatically. Or at least determine automatically when optimization is definitely required and ask user to run it by providing an option to it the way update new version come up or when ever new version gets installed do optimization simultaneously.

    I will still continue to say as a functional user I am not really concerned with this process and everything needs automatically handled.

    Thanks,
    Abhijit

  • bundtkate
    edited July 2019
    Options

    We have no way to determine if this is needed, @Abhijit. As Mike mentioned, the only time we'd recommend optimizing your database is if you're finding 1Password starts slower than normal. We know how fast 1Password starts for you, but we haven't a clue what's normal for you. 1Password is really snappy on my desktop and starts in the blink of an eye. On my far less powerful Surface, it starts much slower. If I saw the same performance on my desktop, that would be abnormal and might warrant optimizing the database, but on the Surface, a second or two to start is expected. So we can't put a hard and fast number on how long 1Password should take to start. Even if we were to use the first startup as a benchmark (so it's defined specifically for your system) and flag when it's slower than that, we still can't know if that slower start is because of the database. What if you added another startup program that puts a significant load on your PC's resources and that's what explains the change? We'll be prompting you to optimize your database suggesting that it will improve performance when it will, in fact, make no difference at all. You and I can definitely sit down and I can use what 1Password does know in combination with information from you about your computing environment to make a reasoned assessment, of course, but 1Password simply cannot make an accurate assessment of when this step will be helpful on its own. Suggesting it when it won't be is also a poor experience.

    Automation is great when done well. If we could accurately predict with reasonable certainty when this would help, I'd be all in favor of prompting folks to do so. When an action is rarely needed and we can't make a sufficiently accurate prediction of when it will be helpful, the better choice is to consider these on a case-by-case basis and either suggest this step ourselves armed with proper info or allow our customers to decide when such steps are wise.

  • Abhijit
    Abhijit
    Community Member
    Options

    You are always right! Users need to run the Database Optimization process.

    Thanks,
    Abhijit

  • Ideally, @Abhijit, they won't need to run it at all. :wink: But you're right that, when needed, it's something we definitely feel should be y'all's decision. :chuffed:

  • Abhijit
    Abhijit
    Community Member
    Options

    That is what I said in first comment, the ideal situation: "Why a user should do it and what way he is concerned with databases and optimizing it?" :blush:

    I also I am not able to digest the fact that how many records one can have that you require something like optimization for in today's big data world?? What this process exactly does? Can we see that we totally eliminate this requirement?? etc.

    I don't require answers to these questions but if possibly you can pass this to development if it is worth. Does MAC version also have this kind of optimization?

    Thanks,
    Abhijit

  • Greg
    Greg
    1Password Alumni
    Options

    Hi @Abhijit,

    Yes, it has:

    We don't formally document what's behind Optimize database, especially in 1Password 7 for Windows. It is under very active development now and this feature can change between releases. I believe Mike's reply above gives you an insight of what it does at the moment.

    If your vault is not that large and you do not see any reasons for you to use that tool, it is fine. However, there are some situations where it might help, so this button is helpful for troubleshooting. Ideally, 1Password will be working correctly, so you won't have to go into Help menu at all. :)

    Let us know if you have other questions, we are happy to help. Thank you!

    ++
    Greg

  • Abhijit
    Abhijit
    Community Member
    Options

    Thanks Greg! I agree with you.

    Side effect of your screenshot: Windows does have tools menu but only one tool. Now as I see MAC has lot of tools. Now as my vault is in cloud can I onetime use MAC and cleanup my duplicates using the option. And then continue with using windows?

    Thanks,
    Abhijit

  • Many of those tools options don't apply on Windows right now, @Abhijit. You'll likely see some of them, like duplicate removal, pop up in the future, but they're not available just yet. If you have a 1Password membership, though, then yes – anything you do using the tools menu on Mac will sync over to Windows. "Clean up Duplicate Items" however, is very picky about what it considers a true duplicate. This is done on purpose as missing a duplicate may be annoying, but deleting something that wasn't a duplicate is much more dangerous. We built that tool to err on the side of keeping data, even if it might be a duplicate. It's super handy in many circumstances, but it is not only possible but likely it will leave some items that are *technically** duplicates (but not obviously so) in place. To give an example, two items with exactly the same data but different dates modified won't be tidied.

    Referencing back to the tools menu generally (whether on Mac or Windows), I find a good way to think about these things is as options that should largely only be used when one of us suggests them. We put them in the UI to make them easy to access when needed and because there's no harm in using them on your own, but they're designed to address very specific issues that aren't easily identified without some investigating. We don't expect y'all to use them on your own. You certainly can but there's zero requirement to ever touch that menu and chances are you won't ever need to.

  • Abhijit
    Abhijit
    Community Member
    Options

    Thank you @bundtkate !!

  • ag_ana
    ag_ana
    1Password Alumni
    Options

    @Abhijit, on behalf of bundtkate, you are very welcome!

    If you have any other questions, please feel free to reach out anytime.

    Have a wonderful day :)

This discussion has been closed.