In my MacOS Passwords I have ±3400 entries. A roughly 341KB CSV. Searching in that list in the preference panel or Keychain app is dog-slow on my M1 Pro Studio or on my M3 MacBook Air. How??
It seems obvious how you could make it slow. Just naively iterate over the entire series of objects looking up the name for each.
This is the obvious low effort, low complexity solution. Of course you could make it fast, but that would take time and effort for a feature most people won't notice.
When the first MacBooks came out with a Secure Enclave, Keychain was just unworkable slow. You had to type your search query elsewhere and then paste it in, or you’d be looking at a beachball for minutes. Took them a major OS X release before it became somewhat bearable again.
The new Passwords is a joke. UX errors all over the place, modal based view with a toggle to start editing. If you need to enter a password in another area of System Preferences, you need to back out of the auth flow, switch to Passwords and copy the credentials over to a temporary file.
SwiftUI and Catalyst. Somebody has probably implemented that list and try to rebuild the app UI at every keystroke (I think the UI is a single thread on macOS). There are optimizations, but that requires being aware that beneath the declarative world, it's an imperative foundation.