web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Does it help performan...
Power Apps
Unanswered

Does it help performance if i use variable for colors,size,borders etc ?

(0) ShareShare
ReportReport
Posted on by 327

Hi all

 

just want to know if I should start using variables for text colors text size etc would it make a difference in performance?

Categories:
I have the same question (0)
  • Akah Mandela Profile Picture
    445 on at

    Using variables for text colors, text size, and other properties can improve the performance of your app in some cases. Variables are stored in memory and can be accessed very quickly, unlike data from cloud sources that require connector calls and network latency. Variables can also help you avoid repeating the same formulas or values in multiple places, which can reduce the complexity and size of your app.

    However, using variables also has some drawbacks. Variables can consume memory and affect the app’s loading time, especially if they are large or complex. Variables can also introduce errors or inconsistencies if they are not updated or cleared properly. Variables are also not supported by delegation, which means they cannot handle large amounts of data from cloud sources.

    Therefore, you should use variables wisely and only when necessary. Some best practices for using variables are:

    • Use global variables for app-wide settings or constants, such as theme colors, user information, or app version.
    • Use context variables for screen-specific settings or temporary values, such as filters, selections, or states.
    • Use collections for storing and manipulating data in memory, such as offline data, user inputs, or intermediate results.
    • Use the Set, UpdateContext, and ClearCollect functions to create and update variables and collections.
    • Use the Reset function to clear the values of input controls and variables associated with them.
    • Use the Clear and ClearAll functions to remove variables and collections from memory when they are no longer needed.
  • WarrenBelz Profile Picture
    153,529 Most Valuable Professional on at

    Hi @moerah ,

    I have a style Table Variable in every app I do and have not noticed anything in performance penalties. Almost every control references it in multiple parameters directly or indirectly. An example is below

    Set(
     gblTheme,
     {
     Dark: RGBA(30, 65, 144, 1),
     Lighter: RGBA(32, 162, 229, 1),
     Light: RGBA(18, 174, 196, 1),
     Hover: ColorFade(RGBA(30, 65, 144, 1), 95%),
     Shade: ColorFade(RGBA(18, 174, 196, 1), 85%),
     Press: ColorFade(RGBA(30, 65, 144, 1), 30%),
     lFont: Font.'Open Sans Condensed',
     tFont: Font.'Segoe UI',
     lSize: 13,
     tSize: 11
     }
    );

    This also allows the very rapid change of anything throughout the app.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 428

#2
WarrenBelz Profile Picture

WarrenBelz 374 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard