[PR #13692] Call UpdateJumplist only if the settings changed #29721

Open
opened 2026-01-31 09:36:30 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/13692

State: closed
Merged: Yes


This commit stores a hash of the settings.json file in ApplicationState
with which we can detect whether the settings contents actually changed.
Since I only use a small 64-bit hash as opposed to SHA2 for instance,
I'm taking the last write time of the file into account as well.
This allows us to skip calling UpdateJumplist at least the majority of app
launches which hopefully improves launch performance on devices with slower IO.

Part of #5907.

Validation Steps Performed

  • Delete some profiles (see above), save settings, tasks are gone
    FYI For some (...) inexplicable reason, shell task lists are preserved forever
    even if msix applications are uninstalled, etc. So to test whether tasks are
    properly written on first app launch we have to delete some profiles/tasks
    first, otherwise we can't see whether they're actually written later.
  • Now exit Windows Terminal, delete settings.json and relaunch
  • All tasks are back
  • With a debugger, ensure that CascadiaSettings::WriteSettingsToDisk
    generates the same hash that LoadAll reads.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/13692 **State:** closed **Merged:** Yes --- This commit stores a hash of the `settings.json` file in `ApplicationState` with which we can detect whether the settings contents actually changed. Since I only use a small 64-bit hash as opposed to SHA2 for instance, I'm taking the last write time of the file into account as well. This allows us to skip calling `UpdateJumplist` at least the majority of app launches which hopefully improves launch performance on devices with slower IO. Part of #5907. ## Validation Steps Performed * Delete some profiles (see above), save settings, tasks are gone ✅ FYI For some (...) inexplicable reason, shell task lists are preserved forever even if msix applications are uninstalled, etc. So to test whether tasks are properly written on first app launch we have to delete some profiles/tasks first, otherwise we can't see whether they're actually written later. * Now exit Windows Terminal, delete `settings.json` and relaunch * All tasks are back ✅ * With a debugger, ensure that `CascadiaSettings::WriteSettingsToDisk` generates the same hash that `LoadAll` reads. ✅
claunia added the pull-request label 2026-01-31 09:36:30 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29721