Named Formulas have been pretty cool so far and have helped me cut down on a lot of redundant code in apps. However, I'm still hesitant to convert certain processes into formulas because I'm worried about performance issues.
For example, I have an app that switches to night mode at 7pm and light mode at 7am. At the start of each minute, before it processes any of the other data, it checks to see what time range it falls under and sets the global color variable accordingly. All of the elements on the page that use the color variable automatically update their colors without having to run the time check themselves.
From what I understand, named formulas are beneficial because they are always current and only are calculate when they are referenced. However, if I moved the global color variable to a formula, it seems like it would cause *more* work to be done instead because each element referring to this formula would need to check the night mode status for themselves. Am I understanding this correctly, or am I misunderstanding the feature?