Removed Debug

On some devices it looks like removing the System.println() statements from inside an 'if' clause whose condition is a constant (static constant Globals.scDebug) makes a memory saving. This would suggest the compiler does not propagate constants and prune unreachable code. However in the device of greatest interest debug removal has made no difference to the memory usage. Here the conditional clauses have been turned into comments that can be removed on a case-by-case basis otherwise the debug printing is too voluminous anyway.
This commit is contained in:
Philip Abbey
2024-01-21 17:53:37 +00:00
parent 62b8f0fccf
commit d9ecaf34ee
12 changed files with 173 additions and 403 deletions

View File

@ -86,14 +86,12 @@ class Settings {
unsetWebhookId();
}
}
if (Globals.scDebug) {
System.println("Settings update(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
if (Background.getTemporalEventRegisteredTime() != null) {
System.println("Settings update(): getTemporalEventRegisteredTime().value() = " + Background.getTemporalEventRegisteredTime().value().format("%d") + " seconds");
} else {
System.println("Settings update(): getTemporalEventRegisteredTime() = null");
}
}
// System.println("Settings update(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
// if (Background.getTemporalEventRegisteredTime() != null) {
// System.println("Settings update(): getTemporalEventRegisteredTime().value() = " + Background.getTemporalEventRegisteredTime().value().format("%d") + " seconds");
// } else {
// System.println("Settings update(): getTemporalEventRegisteredTime() = null");
// }
}
static function getApiKey() as Lang.String {