FireMonkey Performance Issues

后端 未结 1 375
悲&欢浪女
悲&欢浪女 2020-12-30 10:42

I am using Delphi XE2 with update 4 hotfix 1

My default FMX app is stating very slow and on event it is freezing for a while. Eg: when i click on a button, the whole

相关标签:
1条回答
  • 2020-12-30 11:04

    The real problem was with some firemonkey Effects and Firemonkeys default settings

    default GlobalUseDirect2D = true while GlobalUseHWEffects := true is the real cause for performance issue, enabling both is using both CPU and GPU in my machine.So make one of them to false. I recommend you to do GlobalUseDirect2D = false and GlobalUseHWEffects := true for less usage of CPU.

    And now you will be also able to get improved fonts (best ever firemonkey can generate)

    Not all the customers will have high end Graphic GPUs

    I am using an Intel Mobile graphic chip, so i don't think my one will have all the capabilities to support all firemonkey effects. following the code and comment can be seen in FMX.Types

    // On low-end hardware or mobile bitmap effects are slowly
      GlobalDisableFocusEffect: Boolean = False;
    

    but i can't understand why they have made it false by default.(so enable and disable depends on client GPU capabilities)

    by GlobalDisableFocusEffect you will no more able to use Effects (eg: outergloweffect ).... but again this statement is still no more true....

    by GlobalDisableFocusEffect not all the effects are disabled,

    for example

    1. Tinnergloweffect in button style in windows style is the reason for freezing
    2. Tinnergloweffect in headeritemstyle in Dark style is the reason freezing.

    and there may be tons of example...

    So in my scenario i was forced to remove all effects form the style.., Blend , Dark styles are working much better because they use less TEffects (?) ,but now i am having a better GUI with better performance (I feel Blend and Dark styles look cool than native like UIs )

    0 讨论(0)
提交回复
热议问题