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

@ -30,9 +30,7 @@ class QuitTimer extends Timer.Timer {
}
function exitApp() as Void {
if (Globals.scDebug) {
System.println("QuitTimer exitApp(): Exiting");
}
// System.println("QuitTimer exitApp(): Exiting");
// This will exit the system cleanly from any point within an app.
System.exit();
}
@ -45,9 +43,7 @@ class QuitTimer extends Timer.Timer {
}
function reset() {
if (Globals.scDebug) {
System.println("QuitTimer reset(): Restarted quit timer");
}
// System.println("QuitTimer reset(): Restarted quit timer");
stop();
begin();
}