Commit 04cfeaa
⚡ 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 1601ea0 commit 04cfeaa
2 files changed
Lines changed: 5 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 64 | + | |
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
| |||
0 commit comments