Skip to content

Commit

Permalink
perf: always include ignore_files in data (#1360)
Browse files Browse the repository at this point in the history
Found out just last night that querying a data path that isn't
found is treated as `error` by the storage module, and as such
a source of allocations. So let's avoid it where we can.

```
Before  3519103080 B/op	 69457852 allocs/op
After   3508152464 B/op  69203795 allocs/op
```

Signed-off-by: Anders Eknert <[email protected]>
  • Loading branch information
anderseknert authored Jan 23, 2025
1 parent 0d506bb commit b29ad44
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/linter/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,7 @@ func (l Linter) paramsToRulesConfig() map[string]any {
"enable_all": l.enableAll,
"enable_category": util.NullToEmpty(l.enableCategory),
"enable": util.NullToEmpty(l.enable),
}

if l.ignoreFiles != nil {
params["ignore_files"] = l.ignoreFiles
"ignore_files": util.NullToEmpty(l.ignoreFiles),
}

return map[string]any{
Expand Down

0 comments on commit b29ad44

Please sign in to comment.