Commit graph

37 commits

Author SHA1 Message Date
Daisuke Maki a5c51bcc4b fix: pool Matched structs with sync.Pool to reduce GC pressure
Benchmark (10k lines x 3 cycles):
  pooled vs unpooled: 107KiB vs 562KiB (-81%), 2 vs 10k allocs
  end-to-end filter: 10.71MiB -> 10.14MiB (-5%), 150.6k -> 121.5k allocs (-19%)
2026-02-22 00:26:22 +09:00
Daisuke Maki 6ea14d47b9 fix: reuse match/dedup slices across regexp filter loop iterations
Move slice declarations outside loop and reset with [:0] each iteration.

| Metric     | Before  | After   | Delta  |
|------------|---------|---------|--------|
| allocs/op  | 2209    | 1813    | -396   |
| B/op       | 176836  | 147849  | -28987 |
| ns/op      | ~352k   | ~317k   | -10%   |
2026-02-21 22:28:36 +09:00
lestrrat 76f0724099
Merge pull request #764 from peco/fix-named-returns
remove named return values from Compile and MovePage
2026-02-20 22:31:52 +09:00
lestrrat b5b1f523be
Merge pull request #765 from peco/fix-regexp-submatch
use FindAllStringIndex instead of FindAllStringSubmatchIndex
2026-02-20 22:31:17 +09:00
lestrrat 2914b94aaa
Merge pull request #762 from peco/fix-regexp-shadow
rename shadowed loop variable in regexp filter
2026-02-20 22:30:44 +09:00
Daisuke Maki 5fa4303b52 standardize on time.Since in regexp cache eviction 2026-02-20 22:27:23 +09:00
Daisuke Maki 0354f3071a rename shadowed loop variable in regexp filter 2026-02-20 22:27:20 +09:00
Daisuke Maki e32edbda88 remove named return values from Compile and MovePage 2026-02-20 22:27:01 +09:00
Daisuke Maki 2f20cddcf6 use FindAllStringIndex instead of FindAllStringSubmatchIndex 2026-02-20 22:26:47 +09:00
Daisuke Maki 70975b098e use LRU eviction 2026-02-20 20:57:21 +09:00
Daisuke Maki 8a9dfefb3a change applyFn to interface 2026-02-20 14:05:22 +09:00
Daisuke Maki 88b5b7a39c appease linter 2026-02-20 13:42:55 +09:00
Daisuke Maki 1fea5cd5a0 Replace raw closure callbacks with interfaces 2026-02-20 13:35:31 +09:00
Daisuke Maki fc18c0d3de Methodically add function comments 2026-02-20 10:55:49 +09:00
Daisuke Maki 95e13933c2 Do away with interface.go files 2026-02-18 21:12:19 +09:00
lestrrat e09776384f
Merge pull request #696 from peco/fix-filter-dedup-cancellation
Extract checkCancelled helper for filter loops
2026-02-18 14:51:40 +09:00
lestrrat 6fdcd40b78
Merge pull request #699 from peco/fix-filter-dedup-exclusion
Extract isExcluded helper for negative term check
2026-02-18 14:48:45 +09:00
Daisuke Maki 1e90260188 Extract checkCancelled helper for filter loops 2026-02-18 14:46:05 +09:00
Daisuke Maki 0d55ffa4ae Extract isExcluded helper for negative term check 2026-02-18 14:46:04 +09:00
Daisuke Maki 44b78c5dd8 Extract newRegexpFilter helper for filter constructors 2026-02-18 14:46:03 +09:00
Daisuke Maki 46331edcfd Check for far wider range of things in lint 2026-02-18 07:49:40 +09:00
Daisuke Maki e61e114ded convert missing context key refactoring 2026-02-17 21:40:04 +09:00
Daisuke Maki 939f75ee85 Remove unused outch 2026-02-17 18:58:18 +09:00
Daisuke Maki 28d7583555 Use saner struct key approach 2026-02-17 13:13:28 +09:00
Daisuke Maki f5f6262d82 use types in pipelines 2026-02-16 23:51:36 +09:00
Daisuke Maki 7f62fe18b3 Refactor filter 2026-02-16 22:43:11 +09:00
Daisuke Maki 91339e96f9 Do away with pkg/errors 2026-02-16 22:06:21 +09:00
Daisuke Maki 8ac38b0de6 appease linter 2026-02-16 14:35:30 +09:00
Daisuke Maki 87ce6ab7cb Negative filters 2026-02-16 14:31:16 +09:00
Daisuke Maki 835f4698c2 Use ctx.Done() to check for Send() success/failure 2026-02-16 09:59:59 +09:00
Daisuke Maki 1a76db2e67 Skip processing in chunks for parallel workers 2026-02-16 09:27:33 +09:00
Daisuke Maki 97f408b99e First pass optimizing for large buffers 2026-02-16 09:00:07 +09:00
Daisuke Maki e4f2b4837d optimizations around memory usage 2026-02-14 15:47:37 +09:00
Daisuke Maki db63d9f380 Add linting fixes 2026-02-14 07:48:23 +09:00
James McDonnell 6d0ff86f90 Add case insensitive regex as a filter option
Regexp is the only way to do boolean OR searches.

Having the option to not have to type  is really convenient
2025-11-09 14:39:57 -08:00
Daisuke Maki 47be5c7c85 Integrate ExternalCommand into the new format 2016-12-14 14:59:38 +09:00
Daisuke Maki 61b5d22fb8 Move stuff around for better code organization 2016-12-14 11:00:22 +09:00