Fix #151 - reduce initial memory footprint

This commit is contained in:
Junegunn Choi
2015-03-19 19:59:38 +09:00
parent 6130026786
commit d94dfe0876
2 changed files with 27 additions and 1 deletions

View File

@@ -134,6 +134,10 @@ func (m *Matcher) scan(request MatchRequest) (*Merger, bool) {
}
pattern := request.pattern
empty := pattern.IsEmpty()
if empty {
return PassMerger(&request.chunks, m.tac), false
}
cancelled := util.NewAtomicBool(false)
slices := m.sliceChunks(request.chunks)