marius-wieschollek / passwords

A simple, yet feature rich password manager for Nextcloud
GNU Affero General Public License v3.0
201 stars 39 forks source link

[BUG]: Search is incredibly slow with client side encryption and 235 imported passwords #645

Open HolgerHees opened 3 months ago

HolgerHees commented 3 months ago

⚠️ This issue respects the following points: ⚠️

Server Information

{
    "version": {
        "server": "28.0.3.2",
        "app": "2024.3.20",
        "lsr": false,
        "php": "8.2.17",
        "cronPhp": "8.2.17"
    },
    "environment": {
        "os": "Linux",
        "architecture": "x86_64",
        "bits": 64,
        "database": "mysql",
        "cron": "cron",
        "proxy": false,
        "sslProxy": false,
        "subdirectory": false
    },
    "services": {
        "images": "imagick",
        "favicons": "default",
        "previews": "default",
        "security": "hibp",
        "words": "auto",
        "previewApi": false,
        "faviconApi": false
    },
    "status": {
        "autoBackupRestored": false
    },
    "settings": {
        "channel": "stable",
        "nightlies": false,
        "handbook": false,
        "performance": 5
    },
    "encryption": {
        "sse": {
            "SSEv1r1": false,
            "SSEv1r2": false,
            "SSEv2r1": false,
            "SSEv3r1": false,
            "none": true,
            "default": "none"
        },
        "cse": {
            "CSEv1r1": true,
            "none": false,
            "default": "CSEv1r1"
        }
    }
}

Client Information

Browser and Version: Firefox 123.0.1 Client OS and Version: openSUSE 15.5

Bug description

I run passwords with client side encryption enabled and 235 encrypted password.

If I use the embedded search, each time I type a character it tooks >1 seconds to calculate the search results.

This means if I type a word with 4 characters, it takes 4-6 seconds until it is finished and i see a delay of >1 second after each character.

If I use the embedded search in keeweb or passman (client side encryption enabled too) with the same amount of passwords, it calculates the search result <100ms which feels like immediately and gives a much smoother text search writing feeling.

Currently, this is the last blocker which prevents me from migrating away from keeweb. And I don't want to migrate to passman, because I have the feeling that this app (passwords) has much more active development.

Steps to reproduce

  1. Open the app
  2. Import 235 passwords
  3. Enable client side encryption
  4. Type a search word of 4 characters
  5. Wait 6 seconds

Expected behavior

  1. Open the app
  2. Import 235 passwords
  3. Enable client side encryption
  4. Type a search word of 4 characters
  5. Don't wait 6 seconds

Nextcloud Logs

No response

Browser Logs

No response