Commit 3cd4d3e
committed
extensions: Simplify code used for loading xlets, improve startup
speed, fix backtrace uselessness.
- Drop 'custom' importer code, use native cjs importer
- Leave compatibility functions for require() and module.exports
Fixes/improves:
- Faster Cinnamon startup (for my random configuration, ~1550ms down
to ~1200ms).
- Improved logging.
- More consistent code (use of deprecated features will start getting
flagged and/or blocked for PRs in Cinnamon and spice repositories.
- Previous code was practically unmaintainable by sane people.
Logging - where before we'd see this useless garbage:
(cinnamon:4334): St-CRITICAL **: 22:19:57.081: st_widget_get_theme_node called on the widget [0x622f6579b3c0 StLabel.hourly-data ("...")] which is not in the stage.
== Stack trace for context 0x622f63105b50 ==
0 7ffd484001c0 b /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:19086 (359f8e6c9c0 @ 279)
1 622f632b5d08 i /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:19059 (359f8e6c970 @ 23)
2 7ffd48400ca0 b /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:18976 (359f8e6c6a0 @ 807)
3 622f632b5b68 i /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:19550 (359f8e6d650 @ 104)
4 622f632b5ab8 i /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:19842 (359f8e6e2e0 @ 681)
5 622f632b5a08 i self-hosted:1461 (1eb5245b46f0 @ 30)
6 7ffd484015a0 b self-hosted:852 (359f8e92dd0 @ 15)
we now get:
(cinnamon:4334): St-CRITICAL **: 22:20:36.263: st_widget_get_theme_node called on the widget [0x58cf71ab5180 StLabel.hourly-data ("...")] which is not in the stage.
== Stack trace for context 0x58cf6ee74250 ==
0 7fffae294e10 b /home/mtwebster/.local/share/cinnamon/applets/weather@mockturtl/3.8/weather-applet.js:19084 (387d8e1fd1a0 @ 279)
1 58cf6eeac1f8 i /home/mtwebster/.local/share/cinnamon/applets/weather@mockturtl/3.8/weather-applet.js:19057 (387d8e1fd150 @ 23)
2 7fffae2958f0 b /home/mtwebster/.local/share/cinnamon/applets/weather@mockturtl/3.8/weather-applet.js:18974 (387d8e1fce20 @ 807)
3 58cf6eeac058 i /home/mtwebster/.local/share/cinnamon/applets/weather@mockturtl/3.8/weather-applet.js:19548 (387d8e1fddd0 @ 104)
4 58cf6eeabfa8 i /home/mtwebster/.local/share/cinnamon/applets/weather@mockturtl/3.8/weather-applet.js:19840 (387d8e1fea60 @ 681)
5 58cf6eeabef8 i self-hosted:1461 (2daaca0bf470 @ 30)
6 7fffae2961f0 b self-hosted:852 (e85adf8c6a0 @ 15)
Requires linuxmint/cjs#136 for xlet 'reload'
functionality to work.1 parent 9211718 commit 3cd4d3e
File tree
17 files changed
+454
-423
lines changed- js
- misc
- ui
17 files changed
+454
-423
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
1224 | 1225 | | |
1225 | 1226 | | |
1226 | 1227 | | |
1227 | | - | |
1228 | | - | |
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Lines changed: 23 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
27 | 18 | | |
28 | | - | |
29 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | | - | |
| 417 | + | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
| |||
860 | 861 | | |
861 | 862 | | |
862 | 863 | | |
863 | | - | |
| 864 | + | |
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
| |||
1227 | 1228 | | |
1228 | 1229 | | |
1229 | 1230 | | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 319 | + | |
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | | - | |
432 | | - | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments