Commit 1601ea0
⚡ Bolt: Optimize Context variable/function lookups
* Removed redundant `.clone()` operations on inner data inside `get_func` and `get_variable` when mapping `ContextValue`.
* Refactored `value` to perform a single `.get(name)` lookup rather than doing `is_none()` followed by `unwrap()`.
* Avoided holding `MutexGuard` across `func(Vec::new())` execution, thus dropping the lock early and preventing potential deadlock.
* Documented the learning in `.jules/bolt.md`.
Co-authored-by: ashyanSpada <22587148+ashyanSpada@users.noreply.github.com>1 parent 5576973 commit 1601ea0
2 files changed
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 50 | + | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 54 | + | |
61 | 55 | | |
62 | | - | |
63 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
| |||
0 commit comments