summaryrefslogtreecommitdiffstats
path: root/src/matcher.go
AgeCommit message (Collapse)Author
2024-05-07Refactor the code so that fzf can be used as a library (#3769)Junegunn Choi
2023-05-27Fix bug where preview is not updated after reload when --disabled is setJunegunn Choi
Fix #3311
2019-11-10Experimental implementation of "reload" actionJunegunn Choi
# Reload input list with different sources seq 10 | fzf --bind 'ctrl-a:reload(seq 100),ctrl-b:reload(seq 1000)' # Reload as you type seq 10 | fzf --bind 'change:reload:seq {q}' --phony # Integration with ripgrep RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " INITIAL_QUERY="" FZF_DEFAULT_COMMAND="$RG_PREFIX '$INITIAL_QUERY'" \ fzf --bind "change:reload:$RG_PREFIX {q} || true" \ --ansi --phony --query "$INITIAL_QUERY" Close #751 Close #965 Close #974 Close #1736 Related #1723
2019-07-19Code cleanup (#1640)Christian Muehlhaeuser
- Replaced time.Now().Sub() with time.Since() - Replaced unnecessary string/byte slice conversions - Removed obsolete return and value assignment in range loop
2018-12-19Inverse-only matches should not reorder the remaining resultsJunegunn Choi
Fix #1458
2017-07-18Consolidate Result and rank structsJunegunn Choi
By not storing item index twice, we can cut down the size of Result struct and now it makes more sense to store and pass Results by values. Benchmarks show no degradation of performance by additional pointer indirection for looking up index.
2016-09-18Revise ranking algorithmJunegunn Choi
2016-08-20Remove Offset slice from Result structJunegunn Choi
2016-08-19Micro-optimizationsJunegunn Choi
- Make structs smaller - Introduce Result struct and use it to represent matched items instead of reusing Item struct for that purpose - Avoid unnecessary memory allocation - Avoid growing slice from the initial capacity - Code cleanup
2016-08-19Set the upper limit of the number of search go routinesJunegunn Choi
2016-08-18Increase the number of go routines for searchJunegunn Choi
Sort performance increases as the size of each sublist decreases (n in nlog(n) decreases). Merger is then responsible for merging the sorted lists in order, and since in most cases we are only interesed in the matches in the first page on the screen so the overhead in the process is negligible.
2016-08-14LintJunegunn Choi
2016-02-16Go 1.3 compatibilitySergey Vlasov
2015-08-02LintJunegunn Choi
2015-04-17Improvements in performance and memory usageJunegunn Choi
I profiled fzf and it turned out that it was spending significant amount of time repeatedly converting character arrays into Unicode codepoints. This commit greatly improves search performance after the initial scan by memoizing the converted results. This commit also addresses the problem of unbounded memory usage of fzf. fzf is a short-lived process that usually processes small input, so it was implemented to cache the intermediate results very aggressively with no notion of cache expiration/eviction. I still think a proper implementation of caching scheme is definitely an overkill. Instead this commit introduces limits to the maximum size (or minimum selectivity) of the intermediate results that can be cached.
2015-03-31Implement --toggle-sort option (#173)Junegunn Choi
2015-03-22Code cleanupJunegunn Choi
2015-03-19Fix #151 - reduce initial memory footprintJunegunn Choi
2015-02-26Add --tac option and reverse display order of --no-sortJunegunn Choi
DISCLAIMER: This is a backward incompatible change
2015-02-18Fix race condition in asynchronous -1 and -0Junegunn Choi
2015-02-18Make --select-1 and --exit-0 asynchronousJunegunn Choi
2015-02-17Fix typo in codeJunegunn Choi
2015-01-12Reorganize source codeJunegunn Choi
2015-01-12LintJunegunn Choi
2015-01-11Fix race conditionsJunegunn Choi
- Wait for completions of goroutines when cancelling a search - Remove shared access to rank field of Item
2015-01-10Improve response time by only looking at top-N itemsJunegunn Choi
2015-01-04Fix scan limit for --select-1 and --exit-0 optionsJunegunn Choi
2015-01-04Rewrite fzf in GoJunegunn Choi