Commit 28a78b5
Check Calculation cell in lookup_answer before Arc dupes
Summary:
When lookup_answer finds that a module has Answers but not Solutions,
check the Calculation cell directly while still holding the read lock, before
duping the Answers/Load/Bindings Arcs and constructing a TransactionHandle for
solve_exported_key.
The vast majority of solve_exported_key calls hit the Calculation cell fast
path, yet each call still paid for 3+ Arc refcount increments, a SmallMap
lookup for get_stdlib, and TransactionHandle construction. By checking the
Calculation cell first under the existing read lock, we skip all of that
overhead for cached answers.
Reviewed By: yangdanny97
Differential Revision: D93209983
fbshipit-source-id: 841216c657ba8bb30305e7b3f065ee857e77c7141 parent b0b0632 commit 28a78b5
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
1481 | 1490 | | |
1482 | 1491 | | |
1483 | 1492 | | |
1484 | 1493 | | |
1485 | 1494 | | |
1486 | | - | |
| 1495 | + | |
1487 | 1496 | | |
1488 | 1497 | | |
1489 | 1498 | | |
| |||
1493 | 1502 | | |
1494 | 1503 | | |
1495 | 1504 | | |
| 1505 | + | |
1496 | 1506 | | |
1497 | 1507 | | |
1498 | 1508 | | |
| |||
0 commit comments