Commit 045226a
authored
Fix a bug that was causing a huge amount of calls to git APIs
`format_path` is called for each warning/error discovered, and that the method is creating a new instance of the git source plugin at each invocation.
This prevent the plugin from caching any data and, in the case of gitlab at least, means we're hitting the API repeatedly for each warning just to grab the project base URL.
In my case this meant 1000+ calls to the GitLab API which caused a large delay.
This change caches the git plugin on an instance variable so that we don't need to create it every time.1 parent 020d670 commit 045226a
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| |||
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
0 commit comments