Open viniciusfbb opened 5 years ago
hmm, that strange, I didn't see any performance loss in my test. In fact, I even see a performance improvement. do you have a demo or something like this that I could test? actually, https://play.google.com/store/apps/details?id=club.kiskis.app&hl=en is made with this and there is not performance penalty but maybe your scenario is different ...
Correction: Slowness is in ChildrenMouseXXX override implemented in TALCustomScrollBox
Here is the demo: Alcinoe_Inssue_Demo.zip
I still don't fully understand it, but the issue is solved by removing this line:
I will take a look at it ! thanks !
Stephane, I found the real problem. It is here:
Just remove it.
I ran your demo, With_Children and Without_Children and there is absolutely no difference :( what phone are you using for your test?
Android Galaxy S8+ The problem is your changes in FMX.Platform.UI.Android.pas.
When the button is pressed, you are rendering the animation only when the mouse moves, but when the mouse is stopped, the animation is not rendered.
as far as I see there is no impact, did you run the app in debugging? can you try to run it in release just to see?
@viniciusfbb do you still have the problem ? today i face a strange problem where everything was very slow. I uninstall the app from the mobile, delete all dcu, clean everything, and rebuild and resinstall the app and it's start again to work well and fast. I absolutely have no idea why at the beginning the app was running slow :(
@Zeus64 That was a long time ago, I don’t remember, but in my git it’s registered that the solution to this was to change the FMX.Platform.UI.Android.pas. https://github.com/viniciusfbb/alcinoe/commit/21997b61d6c43722b976b8debdadba3e0a1ba38c
I think this was the solution, but anyway it was solved at the time, I still use Alcinoe, not everything, but I use the fixes, TALTexture, TALAnimation and TALVertScrollBox, with Delphi 10.3.3, both for Android and for iOS it is working perfectly and very quickly. Much faster than native Delphi components!
@Zeus64 If you still haven't solved the problem, I found another change here at the time in ALFmxInertialMovement.pas:
procedure TALAniCalculations.TDisplayLinkListener.displayLinkUpdated;
begin
if not fAniCalculations.Down then ///////// <<<<<<<<<<<
begin
if assigned(fAniCalculations.fOnTimer) then
fAniCalculations.fOnTimer(fAniCalculations)
else
fAniCalculations.Calculate;
end;
end;
https://github.com/Zeus64/alcinoe/blob/329361c3c51cd40f09eec1597e33780b36f94eb1/references/embarcadero/rio/10_3_1/patched/fmx/FMX.Controls.pas#L509-L513
All components are losing performance in mouse operations because of this. An easy demo would be when we click a button (keeping the mouse down) and see its animation performing poorly, especially on android phones. You wanted to pass along the mouse operations to be captured by ScrollBox, for example, even when the component inside it have HitTest True, but that way all controls lose performance.
An "ugly" but simple solution would be for the programmer to manually pass these mouse operations over to ScrollBox when needed, creating this same procedures but they will trigger just when the programmer call it, not in ever mouse operations of all controls.
(Sorry for my bad english)