Add new mod: Faster Notifications Settings Page v1.0#4826
Conversation
|
Restored the ## Mod authorship section in the description. That was the validation failure. |
|
Replaced the raw Wh_FindFirstSymbol/NextSymbol/CloseSymbol loop with WindhawkUtils::HookSymbols, using the full decorated names for _AddEntry and PopulateSummaryValues. No behavior change, and it clears the manual-inspection warnings. Passes pr_validation.py locally. |
|
Tested on Windows 11 (26100). Both hooks resolve and apply, the settings cache kicks in, and repeat visits to the Notifications page load in a couple seconds instead of minutes. Green and mergeable, so ready for review whenever. |
Speeds up Settings > System > Notifications on Win11 so repeat visits load in a couple seconds instead of minutes. Hooks _AddEntry and PopulateSummaryValues in SettingsHandlers_Notifications.dll with WindhawkUtils::HookSymbols, caches the per-app settings object across visits, and skips the per-app summary lookup. Both are toggleable and Ctrl+Alt+R clears the cache to force a full rescan.
e489699 to
6443a45
Compare
Submission reviewNote: This review was done by Claude, and then refined manually. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Additional manual notes:
1. Worker threads are not joined before unload → crash window.
static HANDLE g_stopEvent; // CreateEventW(nullptr, TRUE, FALSE, nullptr)
static HANDLE g_watchThread, g_hotkeyThread;
// threads wait on g_stopEvent instead of Sleep(...) so they exit at once
void Wh_ModUninit() {
SetEvent(g_stopEvent);
HANDLE hs[] = { g_watchThread, g_hotkeyThread };
WaitForMultipleObjects(2, hs, TRUE, INFINITE);
CloseHandle(g_watchThread); CloseHandle(g_hotkeyThread); CloseHandle(g_stopEvent);
...
}See taskbar-vd-switcher.wh.cpp for a stop-event + 2. HMODULE kernelBase = GetModuleHandleW(L"kernelbase.dll");
auto pLoadLibraryExW = (decltype(&LoadLibraryExW))GetProcAddress(kernelBase, "LoadLibraryExW");
WindhawkUtils::SetFunctionHook(pLoadLibraryExW, LoadLibraryExW_Hook, &LoadLibraryExW_Orig);With a reliable loader hook, the arbitrary 120 s cap on the watcher stops mattering (you can shorten or drop it). 3. Cached COM objects are released off their creating thread. The Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations about the approach itself.
|
Faster Notifications Settings Page
Adds a new mod (
notifications-settings-page-speedup).The Windows 11 Settings, System, Notifications page rebuilds its full per-app list on every visit, including when you edit one app and press Back. With many notification senders this takes minutes each time. This mod keeps the first open as-is (it fills a cache) and makes later visits load in a couple of seconds, by skipping a per-app summary line and caching each app's settings object across visits. The cached objects read live data, so edits still show correctly. Both behaviours default on and revert instantly when turned off.
Trade-off: skipping the per-app summary removes the small subtitle that shows banners/sounds status at a glance. Every app still shows its name, icon, and main on/off toggle, and all per-app options remain editable by opening the app. This can be turned off to keep the subtitle.
Approach: hooks a couple of internal functions in
SettingsHandlers_Notifications.dllby symbol and caches the per-app object at the controller call that produces it. The offsets are build-specific, so it may need a refresh after a major Windows release.Testing: verified on Windows 11. First open runs the normal full scan; repeat visits, including after editing an app, load in a few seconds with edited toggles shown correctly.
Changelog
If this pull request updates an existing mod, describe the changes below:
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by:
Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.