Commit 9cb0525
optimize lookup_special_export
Summary:
Profiling the indexing of langchain/dify I found >25% of the time was spent waiting on locks in lookup_special_export
There's lots of contention for calculating exports here since we check lookup_special_export so much in bindings
Longer AI explanation: P2152790830
Adding a fast return path that avoids pulling exports before entering the loop reduces the contention.
Reviewed By: rchen152
Differential Revision: D91753332
fbshipit-source-id: f89ef539fa5c9ca8fcc495806969d27b137062b61 parent 93fd467 commit 9cb0525
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1761 | 1761 | | |
1762 | 1762 | | |
1763 | 1763 | | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
1764 | 1770 | | |
1765 | 1771 | | |
1766 | 1772 | | |
| |||
0 commit comments