Skip to content

Commit c39fd28

Browse files
authored
yarr@jtoberling: Fixes for high CPU utilization (#1575)
1 parent 8023a9b commit c39fd28

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

yarr@jtoberling/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.1] - 2025-09-06
9+
- High CPU% fixup and remove xsession-errors pollution
10+
811
## [2.1.0] - 2025-08-21
912
- Stability improvements
1013
- Using SQL.js for sqlite operations

yarr@jtoberling/files/yarr@jtoberling/desklet.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,11 @@ class YarrDesklet extends Desklet.Desklet {
240240
// Initialize async managers
241241
this.timerManager = new TimerManager();
242242
this.uiUpdateManager = new UIUpdateManager();
243-
this.uiUpdateManager.setUpdateCallback(() => this.displayItems());
243+
this.uiUpdateManager.setUpdateCallback(() => {
244+
if (this.uiDisplay && typeof this.uiDisplay.displayItems === 'function') {
245+
this.uiDisplay.displayItems();
246+
}
247+
});
244248
// AsyncErrorHandler is available from logger module
245249
this.asyncCommandExecutor = AsyncCommandExecutor;
246250

@@ -1067,23 +1071,13 @@ class YarrDesklet extends Desklet.Desklet {
10671071
// Internal method to perform the actual display update
10681072
_performDisplayUpdate() {
10691073
try {
1070-
Logger.debug(`_performDisplayUpdate called`);
1071-
Logger.debug(`uiUpdateManager available: ${!!this.uiUpdateManager}`);
1072-
Logger.debug(`uiUpdateManager.scheduleUpdate available: ${!!(this.uiUpdateManager && typeof this.uiUpdateManager.scheduleUpdate === 'function')}`);
1073-
1074-
// PERFORMANCE FIX: Removed timing tracking that was causing system lag
1075-
10761074
// Use UI update manager for batching if available
10771075
if (this.uiUpdateManager && typeof this.uiUpdateManager.scheduleUpdate === 'function') {
1078-
Logger.debug(`Using UI update manager for display update`);
10791076
this.uiUpdateManager.scheduleUpdate();
10801077
} else {
1081-
Logger.debug(`UI update manager not available, using direct update`);
10821078
// Fallback: direct update with error handling
10831079
if (this.uiDisplay && typeof this.uiDisplay.displayItems === 'function') {
1084-
Logger.debug(`Calling uiDisplay.displayItems() directly`);
10851080
this.uiDisplay.displayItems();
1086-
Logger.debug(`uiDisplay.displayItems() completed`);
10871081
} else {
10881082
Logger.error("UI display not available for display update");
10891083
}

yarr@jtoberling/files/yarr@jtoberling/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"max-instances": "1",
33
"description": "Yet Another RSS Reader",
44
"name": "Yet Another RSS Reader",
5-
"version": "2.1.0",
5+
"version": "2.1.1",
66
"uuid": "yarr@jtoberling",
77
"multiversion": true,
88
"author": "jtoberling",

0 commit comments

Comments
 (0)