summaryrefslogtreecommitdiffstats
path: root/src/item.go
AgeCommit message (Collapse)Author
2017-08-15Remove special nilItemJunegunn Choi
2017-07-16Reduce memory footprint of Item structJunegunn Choi
2017-07-16Remove pointer indirection by changing Chunk definitionJunegunn Choi
2017-06-02Fix inconsistent tiebreak scores when --nth is usedJunegunn Choi
Make sure to consistently calculate tiebreak scores based on the original line. This change may not be preferable if you filter aligned tabular input on a subset of columns using --nth. However, if we calculate length tiebreak only on the matched components instead of the entire line, the result can be very confusing when multiple --nth components are specified, so let's keep it simple and consistent. Close #926
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-14LintJunegunn Choi
2016-08-14[perf] Avoid allocating rune array for ascii stringJunegunn Choi
In the best case (all ascii), this reduces the memory footprint by 60% and the response time by 15% to 20%. In the worst case (every line has non-ascii characters), 3 to 4% overhead is observed.
2016-06-14Do not process ANSI codes in --preview output at onceJunegunn Choi
Close #598
2016-04-16Enhanced ranking algorithmJunegunn Choi
Based on the patch by Matt Westcott (@mjwestcott). But with a more conservative approach: - Does not use linearly increasing penalties; It is agreed upon that we should prefer matching characters at the beginnings of the words, but it's not always clear that the relevance is inversely proportional to the distance from the beginning. - The approach here is more conservative in that the bonus is never large enough to override the matchlen, so it can be thought of as the first implicit tiebreak criterion. - One may argue the change breaks the contract of --tiebreak, but the judgement depends on the definition of "tie".
2016-01-14Ignore leading whitespaces when calculating 'begin' indexJunegunn Choi
2016-01-14Simplify Item structureJunegunn Choi
This commit compensates for the performance overhead from the extended tiebreak option.
2016-01-13Accept comma-separated list of sort criteriaJunegunn Choi
2015-11-10Fix compatibility issues with OR operator and inverse termsJunegunn Choi
2015-10-02Use trimmed length when --nth is used with --tiebreak=lengthJunegunn Choi
This change improves sort ordering for aligned tabular input. Given the following input: apple juice 100 apple pie 200 fzf --nth=2 will now prefer the one with pie. Before this change fzf compared "juice " and "pie ", both of which have the same length.
2015-08-28Should not strip ANSI codes when --ansi is not setJunegunn Choi
2015-08-26Fix #329 - Trim ANSI codes from output when --ansi & --with-nth are setJunegunn Choi
2015-08-02GoLintJunegunn Choi
2015-08-02Performance tuning - eager rune array conversionJunegunn Choi
> wc -l /tmp/list2 2594098 /tmp/list2 > time cat /tmp/list2 | fzf-0.10.1-darwin_amd64 -fqwerty > /dev/null real 0m5.418s user 0m10.990s sys 0m1.302s > time cat /tmp/list2 | fzf-head -fqwerty > /dev/null real 0m4.862s user 0m6.619s sys 0m0.982s
2015-08-01Only consider the lengths of the relevant parts when --nth is setJunegunn Choi
2015-06-14Add bind action for executing arbitrary command (#265)Junegunn Choi
e.g. fzf --bind "ctrl-m:execute(less {})" fzf --bind "ctrl-t:execute[tmux new-window -d 'vim {}']"
2015-06-03Color customization (#245)Junegunn 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-04-16Add --tiebreak option for customizing sort criteriaJunegunn Choi
Close #191
2015-03-29Retain ANSI background colorJunegunn Choi
2015-03-22Code cleanupJunegunn Choi
2015-03-19Add support for ANSI color codesJunegunn Choi
2015-02-26Add --tac option and reverse display order of --no-sortJunegunn Choi
DISCLAIMER: This is a backward incompatible change
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-11Fix Transform result cache to speed up subsequent searchesJunegunn Choi
2015-01-10Improve response time by only looking at top-N itemsJunegunn Choi
2015-01-09Reduce memory footprintJunegunn Choi
2015-01-04Rewrite fzf in GoJunegunn Choi