MagicFoundation / Alcinoe

Alcinoe Component Library For Delphi. Full opengl video player, WebRTC delphi wrapper, native ios/android TEdit, Improuved firemonkey controls, Firebase cloud messaging, Android/ios facebook sdk login, Json/Bson Parser, ImageMagick wrapper, MongoDb client And much more
Apache License 2.0
990 stars 220 forks source link

Windows painting performance #83

Closed Spelt closed 5 years ago

Spelt commented 5 years ago

Hi,

Thanks for this great component set! I'm using the FMX Gui stuff mostly for scrolling lots of (big) images and animations in the listview.

On IOS and Android the performance is superb and does not disappoint. I do have a performance issue with Windows (which I did not expect). I just can't get scrolling smooth maybe you or someone else can help out.

I have a test project included. It does not matter if the Interval in AniCalculations is higher or FMX.Types.GlobalUseGPUCanvas := true.

Is it the writing of the bitmaps in Windows which are too slow? I noticed that just dragging images is fine when panning (left mouse down with scroll up/down). It is when AniCalculations kicks in by mouse up.

I know the lib is optimized for mobile but maybe you know what the problem is? The bitmaps are double buffered TALImages

Hope you can help.

test alcinoe windows scroll.zip

Zeus64 commented 5 years ago

Unfortunately on windows yes it's slower :( I didn't implement direct api call in windows like I did on iOS/android and use instead the Tbitmap/Tcanvas implementation that is not super optimized (not multithread also). Also windows use directX (even with GlobalUseGPUCanvas=true) where on iOS/android it's use OpenGL (not sure if this is the root cause of the problem)