Skip to content

Conversation

@mtwebster
Copy link
Member

  • Drops 'custom' importer code, using native cjs importer instead.
  • Leaves 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.
  • All stock xlets updated for correctness.

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.

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.
@mtwebster mtwebster force-pushed the simplify-xlet-loading branch from 9448011 to 185c270 Compare January 23, 2026 15:09
@mtwebster mtwebster changed the title extensions: Simplify code used for loading xlets, improve startup speed, fix backtrace uselessness. [WIP] extensions: Simplify code used for loading xlets, improve startup speed, fix backtrace uselessness. Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants