mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-17 20:08:33 +00:00
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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user