Commit 39245c4
committed
perf: optimize XSettings1 startup — remove Before constraint, skip redundant init, clean up debug code
Remove Before=org.dde.session.Daemon1.service so XSettings1 and dde-session-daemon
start in parallel. On subsequent boots where scale factor is already persisted in
DConfig, skip RandR monitor enumeration, Plymouth scaling, and Greeter Qt theme
update (~100-350ms saved). Remove leftover debug code in getXcbAtomProperty that
queried atom type names and hex-dumped binary property values on every call.
Remove unnecessary isServiceRegistered guard in DSMRegister. Add startup timing
logs (qWarning level) for future profiling.
移除对 dde-session-daemon 的 Before 排序约束,使 XSettings1 和 dde-session-daemon
可以并行启动。后续登录时跳过 RandR 枚举、Plymouth 缩放和 Greeter 更新
(节省约 100-350ms)。清理 getXcbAtomProperty 中的调试遗留代码(每次读取属性
都查询原子类型名称并 hex 转储二进制值)。移除 DSMRegister 中不必要的
isServiceRegistered 检查。添加启动计时日志用于性能分析。
Log: perf: optimize XSettings1 startup — remove Before constraint, skip redundant init, clean up debug code
Change-Id: I2b5f4e9404bc2af10e077d936698a2b2569d2a8e1 parent 6cefac6 commit 39245c4
4 files changed
Lines changed: 57 additions & 30 deletions
File tree
- src/plugin-qt/xsettings
- impl
- misc
- modules/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
37 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
38 | 66 | | |
| 67 | + | |
| 68 | + | |
39 | 69 | | |
| 70 | + | |
| 71 | + | |
40 | 72 | | |
| 73 | + | |
41 | 74 | | |
| 75 | + | |
| 76 | + | |
42 | 77 | | |
43 | 78 | | |
44 | 79 | | |
| |||
290 | 325 | | |
291 | 326 | | |
292 | 327 | | |
| 328 | + | |
| 329 | + | |
293 | 330 | | |
| 331 | + | |
294 | 332 | | |
295 | 333 | | |
296 | 334 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
| 259 | + | |
| 260 | + | |
254 | 261 | | |
255 | 262 | | |
256 | 263 | | |
| |||
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| 281 | + | |
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 285 | | |
292 | 286 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | 287 | | |
299 | 288 | | |
300 | 289 | | |
301 | 290 | | |
| 291 | + | |
302 | 292 | | |
303 | 293 | | |
304 | 294 | | |
| |||
321 | 311 | | |
322 | 312 | | |
323 | 313 | | |
| 314 | + | |
| 315 | + | |
324 | 316 | | |
| 317 | + | |
325 | 318 | | |
326 | 319 | | |
327 | 320 | | |
| |||
343 | 336 | | |
344 | 337 | | |
345 | 338 | | |
| 339 | + | |
346 | 340 | | |
347 | 341 | | |
348 | 342 | | |
| 343 | + | |
349 | 344 | | |
350 | 345 | | |
351 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| |||
0 commit comments