summaryrefslogtreecommitdiffstats
path: root/src/cache_test.go
AgeCommit message (Collapse)Author
2021-02-28Check gofmt in `make test`Junegunn Choi
2017-08-15Remove special nilItemJunegunn Choi
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.
2017-07-16Reduce memory footprint of Item 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
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-01-12LintJunegunn Choi
2015-01-11Add test cases for ChunkCacheJunegunn Choi