Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: Listview scrolling performance slow when its full with items



Permlink Replies: 4 - Last Post: Aug 19, 2017 3:03 AM Last Post By: Vassilis Kyrios
drama mix

Posts: 37
Registered: 6/27/12
Listview scrolling performance slow when its full with items
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2017 12:46 PM
i am using listview in my android app and i add about 1000 items with bitmaps and image index but the scrolling of listview become really slow and laggy . i am using delphi Seattle and testing on Huawei Device is it only me ? or its globally a firemonkey performance issue ?

Edited by: drama mix on Apr 27, 2017 12:46 PM
Gabriel Marazzi

Posts: 3
Registered: 10/24/13
Re: Listview scrolling performance slow when its full with items
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 14, 2017 7:26 AM   in response to: drama mix in response to: drama mix
drama mix wrote:
i am using listview in my android app and i add about 1000 items with bitmaps and image index but the scrolling of listview become really slow and laggy . i am using delphi Seattle and testing on Huawei Device is it only me ? or its globally a firemonkey performance issue ?

Edited by: drama mix on Apr 27, 2017 12:46 PM

It is any update about this thread? I've upgrade an app from XE8 to Tokyo, and I found out that the app response in general is really slow.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Listview scrolling performance slow when its full with items
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 14, 2017 12:52 PM   in response to: Gabriel Marazzi in response to: Gabriel Marazzi
Am 14.06.2017 um 16:26 schrieb Gabriel Marazzi:
drama mix wrote:
i am using listview in my android app and i add about 1000 items with bitmaps and image index but the scrolling of listview become really slow and laggy . i am using delphi Seattle and testing on Huawei Device is it only me ? or its globally a firemonkey performance issue ?

Edited by: drama mix on Apr 27, 2017 12:46 PM

It is any update about this thread? I've upgrade an app from XE8 to Tokyo, and I found out that the app response in general is really slow.

Hello,

there are q few bugs in Tokyo which render Android support mostly
useless at this point in time. Embarcadero is already aware of those and
is working on a fix for them.

Greetings

Markus
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Listview scrolling performance slow when its full with items
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 14, 2017 3:06 PM   in response to: Gabriel Marazzi in response to: Gabriel Marazzi
Gabriel Marazzi wrote:

It is any update about this thread? I've upgrade an app from XE8 to Tokyo, and I found out that the app response in
general is really slow.

It's much worse on Android with Delphi 10.2 Tokyo (as opposed to Delphi 10.1 Berlin). I suggest waiting for Update 1,
which is supposed to be coming Real Soon Now(tm)

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Vassilis Kyrios

Posts: 1
Registered: 3/16/00
Re: Listview scrolling performance slow when its full with items
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 19, 2017 3:03 AM   in response to: drama mix in response to: drama mix
drama mix wrote:
i am using listview in my android app and i add about 1000 items with bitmaps and image index but the scrolling of listview become really slow and laggy . i am using delphi Seattle and testing on Huawei Device is it only me ? or its globally a firemonkey performance issue ?

Edited by: drama mix on Apr 27, 2017 12:46 PM

It's not only you. I spent hours yesterday trying to see how I would put a single component like a listview and bring out the speed in drawing of firemonkey.

Firemonkey, has one pro and con at the same time: it draws exactly when you tell it. This is good, but there are circumstances where you want to wait for the screen (the actual hardware) to display the next frame. So to do even the SIMPLEST animation and be smooth, you have to wait for the screen vertical retrace yourself, or with the help of DX if you are on Windows. The way it should have been implemented would be to sync, or even to have a switch for that, but that is another discussion. The bottom line is that FMX with the proper attention can give some excellent results.

So what is the problem with ListView scrolling jerky? It is not that FMX cannot copy with the complexity of the graphics or anything, for it to draw continuously the ListView is a breeze. I still haven't figured out the total bug fix. If you put an Application.ProcessMessages in a timer with a 1-10 msec firing, the application will respond only in the first strokes and then get "numbed" until the animation finishes (however, being extra smooth the way it should). It turns out that once the animation starts, Application.ProcessMessages does not return until it is finished. So if you call Application.ProcessMessages in a timer, the application will not respond until the animation is finished. The same happens if you called Application.HandleMessage. This all happens in a timer.

However, if you put an Application.ProcessMessages on the OnScrollViewChange, you get no side effects: FINALLY the scrolling is extremely smooth, the way it should. This is not a total bug fix because one issue remains: the list is still jerky while holding down and moving the cursor. Although the "inertia" scrolling is totally fixed, the responsivity is still somewhat not perfect under moving with the finger. I hope someone finds a complete answer.

My regards,
Bill
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02