mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-16 11:28:40 +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:
@ -22,9 +22,6 @@ using Toybox.Lang;
|
||||
|
||||
(:glance)
|
||||
class Globals {
|
||||
// Enable printing of messages to the debug console (don't make this a Property
|
||||
// as the messages can't be read from a watch!)
|
||||
static const scDebug = false;
|
||||
static const scAlertTimeout = 2000; // ms
|
||||
static const scTapTimeout = 1000; // ms
|
||||
// Time to let the existing HTTP responses get serviced after a
|
||||
@ -34,5 +31,5 @@ class Globals {
|
||||
// an ErrorView.
|
||||
static const scApiResume = 200; // ms
|
||||
// Warn the user after fetching the menu if their watch is low on memory before the device crashes.
|
||||
static const scLowMem = 0.95; // percent as a fraction.
|
||||
static const scLowMem = 0.90; // percent as a fraction.
|
||||
}
|
||||
|
Reference in New Issue
Block a user