Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support searching only using the first N symbols of copy to increase search performance #845

Open
2 tasks done
750 opened this issue Aug 20, 2024 · 2 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@750
Copy link

750 commented Aug 20, 2024

Before Submitting Your Feature Request

  • Check that there isn't already a similar feature request to avoid creating a duplicate.
  • I have seen the FAQ.

Problem

So my workflow is like this:

  • I copy a lot of text every day, and that sometimes includes many big jsons, like a 1MB one (or 20MB, that happens too).
  • When I copy big jsons, I don't really need it to be searchable. To paste it with Maccy, I just select them with arrow keys or mouse
  • At the same time I do need smaller copies to be searchable

That workflow isn't quite well supported in Maccy: big items make search much slower which is quite unpleasant when I just need to find a 10 digit ID I copied two hours ago of which I remember the first two symbols

Here is a test i performed:

  • Clean maccy storage
  • Copy 20 string of sizes between 5 symbols and and 5 million symbols (the total size is 55MB)

I then tried searching, it was is very slow. During search, Maccy becomes unresponsive (eventually it will finish the search in a few seconds, but still)

I understand that this is probably not the most popular scenario, but I use it very often as a daytime software developer for debugging purposes

And of course, thank you for your great free open source app, it's been a lifesaver

Solution

Maccy could support a configurable "only search in the first N symbols of item" setting, with N=0 as the default (unlimited). That should make the search function virtually instant for all cases, independent of what was copied in Maccy previously

@750 750 added the enhancement New feature or request label Aug 20, 2024
@weisJ
Copy link
Contributor

weisJ commented Aug 20, 2024

I think the more reasonable approach here is to simply make searching faster. For example by migrating it to operate on an in-memory SearchKit index https://developer.apple.com/documentation/coreservices/search_kit

@p0deje
Copy link
Owner

p0deje commented Oct 2, 2024

Maccy already searches for the first 5000 characters, can you provide exact texts where the search is slow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants