strongbox-password-safe / Strongbox

A KeePass/Password Safe Client for iOS and OS X
https://strongboxsafe.com
GNU Affero General Public License v3.0
1.29k stars 100 forks source link

Feature Request: Search and UI performance on Silicon Macs #715

Closed howdytom closed 9 months ago

howdytom commented 11 months ago

Strongbox full-text search is great, but lacks great performance. Searching all fields feels really slow and lagging as you type on a brand M2 Silicon Mac. I though this was issue on my dated 2015 MacBook Pro. I even tried to split up some items to multiple databases to no avail. I do have around 300 items in one database. Do you plan any speed improvements?

Keep up your great work!

strongbox-mark commented 11 months ago

Hi @howdytom - Could you update to 1.58.18 to see if things have improved, did some work here in the last release.

howdytom commented 11 months ago

Sorry to say that. There is still a noticeable delay while typing a search term. It is okay, but Strongbox UI is far from snappy on Silicon Macs. Same delay when switching between Tags and Groups. The item list always has a slight delay which get's annoying on long working hours. I did not set custom favicons, I just use the regular ones on around 100 items.

When I open the same KeepPass file with Keeweb, the item list shows up immediately and searching is racing fast. I know, we can't compare both applications... Don't get me wrong. You are doing a really really great job to push Strongbox forward. I really appreciate you work!

strongbox-mark commented 11 months ago

Hi @howdytom - OK, would you be able to send a screen recording? We have some more improvements to make, but we're testing with 40-50,000 entries and the performance is pretty good here on an M2... So, 300 should not be an issue.

zmijat commented 11 months ago

Happens here as well. But in my case, I believe it is the typing speed issue. It happens everywhere in the app. For example, the Password field when unlocking the database: I will finish typing my password, which is pretty long, but on the screen it will keep "typing" for another second or so. It looks like all the input fields cannot accept more than 2-3 chars per second.

strongbox-mark commented 11 months ago

Hi @zmijat - That definitely sounds odd, are you on 1.58.18?

zmijat commented 11 months ago

Hi @zmijat - That definitely sounds odd, are you on 1.58.18?

Yes, 1.58.18. I forgot to mention, I'm on Intel Mac. I always had this issue, since I start using strongbox about year or so ago. I noticed one interesting thing:

I believe this issue is something different from what the @howdytom described (sorry to hijack your thread). @strongbox-mark please ignore my input on this issue, I will create a new one.

howdytom commented 11 months ago

@strongbox-mark Sorry for the delay in responding. I had to prepare a dummy database. I embedded 2 screen recordings.

Examples 1: Duplicating items using CTRL and keyboard shortcut. The UI is lagging speed. Mouse movements are hanging and delayed. The macOS beachball shows up while I shake the mouse. Unfortunately the beachball is not visible in the screen recording. As you can see the dropdown menu hangs when I try to move the mouse.

https://github.com/strongbox-password-safe/Strongbox/assets/9871520/d67e5515-efca-4d57-bfa2-a29147ee9331

Example 2: The interface hangs a lot when I switch between editing, search and groups. It is difficult to showcase mouse delays. The search input field does not respond after editing. It looks like it has something to do with the local syncing and encrypting process. As you can see the mouse clicks are highlighted green.

https://github.com/strongbox-password-safe/Strongbox/assets/9871520/915c8dc5-c7cc-47ea-a10c-861825e39839

strongbox-mark commented 11 months ago

OK, yes, looks like the CPU is completely pegged, what are you Encryption Settings? Have you tried reducing them on this test database to see if that helps?

howdytom commented 11 months ago

I am using the default Encryption Settings. I never changed any settings.

Screenshot 2023-08-08 at 10 04 23

strongbox-mark commented 11 months ago

OK, and if you drop all those numeric settings to minimum (1) does that help?

howdytom commented 11 months ago

I do not noticed any difference. It is still hanging. This is happening on a brand new M2 Mac Studio Ultra. CPU power should not be an issue. The performance on a MBP running Monterey is even worst. Sorry

strongbox-mark commented 11 months ago

OK, thanks. Could you change the Key Derivation Function to AES and drop settings to minimum? Does it help?

howdytom commented 11 months ago

Duplicating items feels a tiny bit faster. I could be wrong. It is not that a difference, though.

Screenshot 2023-08-08 at 11 27 55

Example 3: Using the arrow key to scroll down is bumpy. In the screen recording I am pressing the arrow all the time.

https://github.com/strongbox-password-safe/Strongbox/assets/9871520/9ba4abd7-7532-4e69-a0d0-1581f84251c7

strongbox-mark commented 11 months ago

Thanks @howdytom - That's v odd. Would you be willing to do a full factory reset? I can't think of anything that would cause this slowdown. For Factory Reset, just go to Advanced Settings > Click Orange Factory Reset button

howdytom commented 11 months ago

@strongbox-mark Thanks, I did a factory reset. Here is what I noticed. I left the Strongbox default preferences untouched. I added and unlocked a Test database (136 items). Overall the UI is a bit more responsive and faster. Duplicating is a tiny but faster. But it is not as fast as 1Password or Keeweb.

Test 1 When I use the arrow key to scroll down, I noticed smooth and fast scrolling on the Sample Items which contains username, password and URL field (without any Favicons). ✅ When I keep scrolling down to the items that 25 custom fields, it slows down as shown from above.🫤

Test 2 As soon as I add 11 databases to the Databases Manager, Strongbox UI is slow and laggy again. All database are closed except the dummy Database.

I am able to reproduce it twice on M1 and M2 Mac Studio. 🫤

strongbox-mark commented 11 months ago

Wow, super strange. Did you mean "11" databases? Does removing a couple of them help? Thanks again for this great feedback.

howdytom commented 11 months ago

Yes, that is correct. 11 .kdbx files. When I remove them from the Database Manager list, Strongbox scrolling feels faster. I can not merge those databases. Separating password lists should increase performance instead of slowing things down.

strongbox-mark commented 11 months ago

For sure, will need to investigate. Would you be able to send the debug info to support@strongboxsafe.com and I'll try to take a look shortly.

howdytom commented 11 months ago

@strongbox-mark Thanks! I am going to send you the debug info. I did some more testing and stumbled upon a interesting behaviour.

  1. When I add '3' databases, that are stored on the local disk to the Database Manager the UI performance feels responsive.
  2. When I add '1' database that is stored on a AFP network drive, Strongbox get's slow and laggy. How is that possible? The affected database is not even unlocked.
strongbox-mark commented 11 months ago

Yeah, no, I have no idea! How about if you remove the 3 databases entirely and just have 1 AFP database? @zmijat Are you using any AFP or network based databases?

howdytom commented 11 months ago

It looks like a performance issue when multiple databases are added to the Strongbox Database Manager. I tested with a fast AFP and SMB network drive and my M2 SSD. Performance get's slow and laggy when you add more than one database.

AFP network drive

  1. With 1 AFP database in the Database Manager, the UI performance feels okay.
  2. When I add 2-3 AFP databases to the Database Manager, scrolling get's slow and laggy. Scrolling through items with 20 custom fields is noticeable slow.

SMB network drive To narrow things down, I copied over the exact databases to another Server which uses the latest SMB version. I removed all databases. It shows the exact same slowness when more than one database is listed.

M2 SSD With the M2 SSD it is not as slow as the network drive, but it is noticeable slower when all database are added. When I keep only one database, Strongbox UI is more responsive.

In this test, I am using the arrow key to scroll down.

zmijat commented 10 months ago

Yeah, no, I have no idea! How about if you remove the 3 databases entirely and just have 1 AFP database? @zmijat Are you using any AFP or network based databases?

Hey @strongbox-mark, I'm sorry I didn't catch your question earlier! I'm using database with Dropbox. It is marked as "available offline" in Dropbox settings. I can see when Strongbox is trying to sync (it shows a toast), but the UI is slow between syncing too.

I tried to copy an old database, and use that as my new database. Just a simple file copy A->B, still within Dropbox directory, and also marked as "available offline". UI become more responsive for few days or so, then it got back to slow. Note that it is slow even if database is not unlocked (still on Login screen).

strongbox-mark commented 10 months ago

Hi @zmijat - would you be able to send your debug info and a screen recording to support@strongboxsafe.com? Will look into it then.

strongbox-mark commented 9 months ago

Hi @zmijat - Could you try 1.58.25 and let me know if it improves things for you?

zmijat commented 9 months ago

Hi @zmijat - Could you try 1.58.25 and let me know if it improves things for you?

Hey @strongbox-mark, just installed 1.58.25. It does improve the speed issues I was complaining about! Input box typing is now as quick as any other app.

strongbox-mark commented 9 months ago

That's great news, I'm going to close this one now, but feel free to open another if there are issues.