Commit 7ad76f9
Avoid copying FB303's get(Regex|Selected)Counters result map in BaseService.h
Summary:
## Context
I was glancing at the [Container Copies](https://www.internalfb.com/intern/unidash/dashboard/bad_patterns/container_copies/?dimensional_context_300674582190283=%7B%22macros%22%3A[]%2C%22operators%22%3A[]%2C%22movingAggregation%22%3A%22DEFAULT%22%2C%22granularity%22%3A%22DEFAULT%22%2C%22limit%22%3A5%7D) Bad Patterns dashboard and this one stood out to me. This is a locally defined `std::map` that we don't seem to use beyond the `result` call where I've added `std::move`.
Similar optimizations were performed in D55817430, where the underlying callback was made to take arguments by value. This must have been missed.
Seems like a small ([~14kW](https://fburl.com/scuba/strobelight_services/whv43t10)), but easy win.
Reviewed By: yfeldblum
Differential Revision: D68642453
fbshipit-source-id: 3d7687ae0d2c9a57304ea86c7b03538ee380f9571 parent 3a66ed4 commit 7ad76f9
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
0 commit comments