Commit 1d32c1c
committed
avoid excessive Arc<Mapping> contention
Conceptually it wasn't wrong for submappings to `Arc::clone` the
pointed-to base mapping, but in practice all the accessors off of
MemCtx return SubMapping with lifetimes constrained by that MemCtx.
The sheer number of submappings being created and destroyed during I/O
operations makes the refcount very hot under load. Lean into the de
facto lifetime constraint on SubMapping and just take a borrow of the
backing Mapping instead of Arc::clone (and implicit ref decrement in
later drop).1 parent 2dc6437 commit 1d32c1c
1 file changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
| 404 | + | |
408 | 405 | | |
409 | | - | |
| 406 | + | |
410 | 407 | | |
411 | 408 | | |
412 | 409 | | |
| |||
1121 | 1118 | | |
1122 | 1119 | | |
1123 | 1120 | | |
1124 | | - | |
| 1121 | + | |
1125 | 1122 | | |
1126 | 1123 | | |
1127 | 1124 | | |
| |||
1167 | 1164 | | |
1168 | 1165 | | |
1169 | 1166 | | |
1170 | | - | |
| 1167 | + | |
1171 | 1168 | | |
1172 | 1169 | | |
1173 | 1170 | | |
1174 | 1171 | | |
1175 | | - | |
| 1172 | + | |
1176 | 1173 | | |
1177 | 1174 | | |
1178 | 1175 | | |
| |||
0 commit comments