Commit 4dbda19
Perf: Batch systemd queries in list_executions endpoints
Replace per-VM systemd D-Bus calls with a single batch query using
ListUnits(). This reduces the number of D-Bus calls from O(n) to O(1)
for persistent VMs, significantly improving response times on CRNs
with many instances.
- Add get_services_active_states() method to SystemDManager that
queries all service states in one ListUnits() call
- Add _get_executions_running_states() helper in views to pre-fetch
all running states efficiently
- Update list_executions and list_executions_v2 to use batch query1 parent 34811d2 commit 4dbda19
2 files changed
+81
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
191 | 221 | | |
192 | 222 | | |
193 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
194 | 228 | | |
195 | 229 | | |
196 | 230 | | |
| |||
200 | 234 | | |
201 | 235 | | |
202 | 236 | | |
203 | | - | |
| 237 | + | |
204 | 238 | | |
205 | 239 | | |
206 | 240 | | |
| |||
211 | 245 | | |
212 | 246 | | |
213 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
214 | 251 | | |
215 | 252 | | |
216 | 253 | | |
| |||
227 | 264 | | |
228 | 265 | | |
229 | 266 | | |
230 | | - | |
| 267 | + | |
231 | 268 | | |
232 | 269 | | |
233 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
133 | 175 | | |
134 | 176 | | |
135 | 177 | | |
| |||
0 commit comments