Repository navigation
Commit 68c8588
perf(sqlite): use prepare_cached for database queries
Replaces conn.execute() and conn.prepare() with conn.prepare_cached() in the sqlite module. This leverages rusqlite's built-in LRU statement cache to avoid recompiling SQL statements on every loop iteration, resolving N+1 compilation overheads during bulk operations.
Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com>1 parent 514e6c0 commit 68c8588
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
164 | | - | |
| 171 | + | |
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
| |||
0 commit comments