mirror of
				https://github.com/house-of-abbey/GarminHomeAssistant.git
				synced 2025-11-04 00:48:14 +00:00 
			
		
		
		
	Update HomeAssistantApp.mc
Removed memory metrics
This commit is contained in:
		@@ -113,9 +113,6 @@ class HomeAssistantApp extends Application.AppBase {
 | 
				
			|||||||
            // System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
 | 
					            // System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call.");
 | 
				
			||||||
            return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
 | 
					            return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String + ".");
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            var stats = System.getSystemStats();
 | 
					 | 
				
			||||||
            var memUsed = (100f * stats.usedMemory) / stats.totalMemory;
 | 
					 | 
				
			||||||
            System.println("Before menu fetch: used = " + stats.usedMemory + ", total = " + stats.totalMemory + ", " + memUsed + "%");
 | 
					 | 
				
			||||||
            var isCached = fetchMenuConfig();
 | 
					            var isCached = fetchMenuConfig();
 | 
				
			||||||
            fetchApiStatus();
 | 
					            fetchApiStatus();
 | 
				
			||||||
            if (WidgetApp.isWidget) {
 | 
					            if (WidgetApp.isWidget) {
 | 
				
			||||||
@@ -255,16 +252,7 @@ class HomeAssistantApp extends Application.AppBase {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private function buildMenu(menu as Lang.Dictionary) {
 | 
					    private function buildMenu(menu as Lang.Dictionary) {
 | 
				
			||||||
        var stats = System.getSystemStats();
 | 
					 | 
				
			||||||
        var memUsed = (100f * stats.usedMemory) / stats.totalMemory;
 | 
					 | 
				
			||||||
        System.println("Before menu construction: used = " + stats.usedMemory + ", total = " + stats.totalMemory + ", " + memUsed + "%");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mHaMenu = new HomeAssistantView(menu, null);
 | 
					        mHaMenu = new HomeAssistantView(menu, null);
 | 
				
			||||||
 | 
					 | 
				
			||||||
        stats = System.getSystemStats();
 | 
					 | 
				
			||||||
        memUsed = (100f * stats.usedMemory) / stats.totalMemory;
 | 
					 | 
				
			||||||
        System.println("After menu construction: used = " + stats.usedMemory + ", total = " + stats.totalMemory + ", " + memUsed + "%");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mQuitTimer.begin();
 | 
					        mQuitTimer.begin();
 | 
				
			||||||
        if (Settings.getIsWidgetStartNoTap()) {
 | 
					        if (Settings.getIsWidgetStartNoTap()) {
 | 
				
			||||||
            // As soon as the menu has been fetched start show the menu of items.
 | 
					            // As soon as the menu has been fetched start show the menu of items.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user