Good day to all.
Tying to optimize code of WF to reduce delay of start (return back to) WS, same for leaving WF to some other place (setting menu, app menu or widget list). Delay abt 3 sec for both directions.
I have some functions which has to be refreshed once per 24 hrs and store received data to “App.Storage” for further usage.
To avoid empty values on initial launch of WF, I’ve made initial call for them in “initialize” function of “View” class. But it calls for delay on start/return to WF. So, I found the way how to remove them from there. Now WF starts normally.
Refresh call for same functions in functions “onEnterSleep” and “onExitSleep” of “view” class. To keep code of those functions inside of “onUpdate” function – useless wastage of battery and memory, due to they have to called once per 24 hours.
Are there any ideas, where to move those functions from “onEnterSleep” and “onExitSleep”? Or somehow to rearrange code, to speed-up exit from WF?