Commit 63a9bd6
committed
pkg/result/processors: compile nolint regexp only once
`regexp.MatchString` compiles regexp for every invocation,
there is no pattern caching there.
This change introduces a precompiled regexp to save some time
while checking comments for nolint directives.
Found using go-perfguard with cpu profile collected while
running golangci-lint on itself.1 parent eaed228 commit 63a9bd6
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| |||
0 commit comments