Commit Graph

21 Commits (master)

Author SHA1 Message Date
Junegunn Choi 4c70745cc1
Fix bug where preview is not updated after reload when --disabled is set
Fix #3311
1 year ago
Junegunn Choi 7c6f5dba63
Fixed --track when used with --tac
Fix #3234
1 year ago
Junegunn Choi 1c7534f009
Add --track option to track the current selection
Close #3186
Related #1890
1 year ago
odeson24 9fe1a7b373
Remove redundant assignment (#2356)
Co-authored-by: Ryan Ou <ryanou@aetherai.com>
3 years ago
Junegunn Choi 0d171ba1d8
Remove special nilItem 7 years ago
Junegunn Choi bbe10f4f77
Consolidate Result and rank structs
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.
7 years ago
Junegunn Choi d4f3d5a164
Remove pointer indirection by changing Chunk definition 7 years ago
Junegunn Choi 827a83efbc
Remove Offset slice from Result struct 8 years ago
Junegunn Choi 37dc273148
Micro-optimizations
- 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
8 years ago
Junegunn Choi d4b6338102
Lint 8 years ago
Junegunn Choi 1d2d32c847 Accept comma-separated list of sort criteria 9 years ago
Junegunn Choi 634670e3ea Lint 9 years ago
Junegunn Choi 2fe1e28220 Improvements in performance and memory usage
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.
9 years ago
Junegunn Choi b431e227da Code cleanup 9 years ago
Junegunn Choi d94dfe0876 Fix #151 - reduce initial memory footprint 9 years ago
Junegunn Choi c1aa5c5f33 Add --tac option and reverse display order of --no-sort
DISCLAIMER: This is a backward incompatible change
9 years ago
Junegunn Choi f5b034095a Fix race condition in asynchronous -1 and -0 9 years ago
Junegunn Choi 7a2bc2cada Lint 10 years ago
Junegunn Choi 9dbf6b02d2 Fix race conditions
- Wait for completions of goroutines when cancelling a search
- Remove shared access to rank field of Item
10 years ago
Junegunn Choi 6e86fee588 Change Merger implementation on --no-sort 10 years ago
Junegunn Choi b7bb100810 Improve response time by only looking at top-N items 10 years ago