Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TListBox scrolls slower and slower



Permlink Replies: 2 - Last Post: Jan 23, 2018 3:16 PM Last Post By: madammar ellias
Stefan Diestelm...

Posts: 19
Registered: 10/27/00
TListBox scrolls slower and slower
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 18, 2018 3:19 AM
Hi i just wan't to post this Problem with my TListBox as my Customer announced it.

They only get this problem with app compiled with 10.2.2 on 10.1.2 it does not happen. 10.2.1 i did not check cause its very time consuming to come to the point.

OS is XCover3 with Android 6

The Scrolling is initiated by scroll gesture.
As the app ist fresh startet scrolling is fine. Using the App we popup a lot of frames with TFrameStand and close them, we do also a lot of DB select / update
After a while using the app the Scrolling gets slower and slower.
After a while the scrolling is so slow that app can not be used any more.

Its not a problem with the TListBox, cause after recreating it (Switching to other App-Modul and switching back to the one with the ListBox, hereby the TListBox is completeley new) the Scroll Speed is as slow as before).

The only thing that works is to close the app and start new.

The Scrolling is programmed in FMX.inertialmovement.pas but this unit has not changed since berlin.

Does anybody get a same issue ? Or any idea what to debug ?
Stefan Diestelm...

Posts: 19
Registered: 10/27/00
Re: TListBox scrolls slower and slower
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 23, 2018 12:33 AM   in response to: Stefan Diestelm... in response to: Stefan Diestelm...
just for those who read this thread
i found the reason in FMX.Forms.pas
the slowliness was not in the scrollig but in the gesturedetection of my fingers.
the gesture could not be detected fast enough because a ResourceObject was injected in the children list of the main form multiple times by applystylelookup. the children list grows longer and longer so the mouse detection for ObjectAtPoint took longer and longer.

Here is the code snipped from FMX.Forms with my patch.
As workaround i removed three lines of code for ios and android

...
{$if not defined(ANDROID) and not defined(IOS)}
// itSDS: in Android/iOS auskommentiert, da hier unter Android das zuletzt mit InsertObject eingefügte ResourceObject nicht mehr entfernt wird.
      AddObject(ResourceObject);
      { bring to front }
      RemoveObject(ResourceObject);
      InsertObject(0, ResourceObject);
      { }
{$endif}
...


I personally do not understand why to add/remove and than insert at top the same object - may be some invisible stuff. But the last ResourceObject is not removed causing the Childenlist to grow.
i ll make a ticket for this soon

Edited by: Stefan Diestelmann on Jan 23, 2018 1:55 AM

Edited by: Stefan Diestelmann on Jan 23, 2018 2:00 AM
madammar ellias

Posts: 111
Registered: 8/17/17
Re: TListBox scrolls slower and slower
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 23, 2018 3:16 PM   in response to: Stefan Diestelm... in response to: Stefan Diestelm...
Stefan Diestelmann wrote:
just for those who read this thread
i found the reason in FMX.Forms.pas
the slowliness was not in the scrollig but in the gesturedetection of my fingers.
the gesture could not be detected fast enough because a ResourceObject was injected in the children list of the main form multiple times by applystylelookup. the children list grows longer and longer so the mouse detection for ObjectAtPoint took longer and longer.

Here is the code snipped from FMX.Forms with my patch.
As workaround i removed three lines of code for ios and android

...
{$if not defined(ANDROID) and not defined(IOS)}
// itSDS: in Android/iOS auskommentiert, da hier unter Android das zuletzt mit InsertObject eingefügte ResourceObject nicht mehr entfernt wird.
      AddObject(ResourceObject);
      { bring to front }
      RemoveObject(ResourceObject);
      InsertObject(0, ResourceObject);
      { }
{$endif}
...


I personally do not understand why to add/remove and than insert at top the same object - may be some invisible stuff. But the last ResourceObject is not removed causing the Childenlist to grow.
i ll make a ticket for this soon
i have same problem with seattle on vertcalscrollbox is this can be applied for at as will i mean in scrolling in general ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02