-
Notifications
You must be signed in to change notification settings - Fork 194
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
Performance: two_percent
is faster and more efficient than fzf
#561
Comments
Just curious. Is there a reason why you can't/won't merge these changes back into skim? |
As I stated in my post:
My experience has been that this project is not actively maintained. I think I still have PRs outstanding: https://github.com/lotabout/skim/pulls/kimono-koans. If anyone wants to assist, and contribute here, I'd help. If no one else is so inclined, right now, I'll just keep developing in my own fork/branch. |
Just curious, what's the reason for the name "two_percent"? It's kinda hard to remeber (as in, what it does) and also to recommend to folks... |
In the US, at least, we sell milk with different percentages of milk fat. If you install |
Have you also implemented fzf-like color option parsing? I am very used to having some elements of the ui in Edit: I tried |
No, I haven't done any work re this, but I already see bold colors in my view? See: https://asciinema.org/a/637475 |
Hi @kimono-koans we'd be happy to work with you to merge your improvements back into Skim ! Please tell us if you are interested |
Maybe the white looks a little bit whiter, but that isn't bold as in bold. |
Once you start merging new things, I'll perhaps work on some commits for upstream. |
With this release, we should have some "quiet time" to start progressively merging your branch if you'd like |
I don't see much point in measuring the performance of v1 algorithm, because it is rarely used in practice. fzf does switch to it if an item is very long, but only for that item, and the rest of the items in the list are processed using the default algorithm. This switching happens when M * N > 102400, where M is the length of the query, and N is the length of an item. So for the query Also, please consider benchmarking against the latest version of fzf because the performance of fzf has improved a lot. |
If the reason you're not using
skim
is raw performance, my branch,two_percent
, is faster, more efficient and uses less memory thanfzf
for largish inputs (40MB):If anyone else is interested in performance improvements, and refactoring to reduce long term memory usage, I've been building on
skim
actively and I am eager to work with others who are similarly inclined.Re: @lotabout 's wonderful comment re: performance:
For ordinary text inputs, I'm using
Arc<Box<str>>
which I think is 32B? If there is some way to useArc<str>
, that would be even better but I can't seem to make it work re: traits. Re: my 10x duplicated KJV Bible 43M-ish corpus, the memory usage is about 90M on my Mac.On ingest, I have a method for deduplicating lines. This is a significant performance win for inputs with lots of empty or the same lines.
Algorithm switching is broken in the latest version. This is fixed in mine. I have a
simple
algorithm which is much closer to thefzf
v1 algo used for large inputs. See above. You too can now write your own super, simple algo or improve mine!I've made a few changes which may help.
My experience has been that ingest was not reading in enough bytes at once, and other threads were spinning wait on the lock.
The text was updated successfully, but these errors were encountered: