Page 1 of 1

Mobile Performance

Posted: Sun Jan 12, 2014 9:09 am
by 16564788
XE5, Firemonkey, Android:

If I put say 2 buttons on a HorzScrollBox component and run it on my Nexus 7, it scrolls smootly and responsively,

If I do the same thing with 2 simple TCharts (one bar series on each), it becomes almost unusably slow and jerky.

Is this something you're aware of? Are improvements likely?

Richard

Re: Mobile Performance

Posted: Tue Jan 14, 2014 11:50 am
by yeray
Hi Richard,

We have reproduced some performance problems without TeeChart and reported to Embarcadero.
Find here the testing application. Drag the trackbar form left to right, right to left etc, then release finger
FMX_Perf.zip
(5.26 KiB) Downloaded 1434 times

Re: Mobile Performance

Posted: Tue Feb 25, 2014 4:24 pm
by 16567863
I have the same problem as RichardS. Firmonkey (XE5) works quite fine on iOS and Android (NEXUS 7 Version 2013). But if I tried to use TeeChart (latest Version 2014) the performance is terribly slow, especially on Android.
I use the 'scroll' Feature of the Chart itself (only 10 datapoints in lineChart series), but it is so slow on the Nexus 7, that it takes some seconds (!) to scroll the chart.

Re: Mobile Performance

Posted: Thu Feb 27, 2014 11:00 am
by yeray
Hi,

Try with this:

Code: Select all

Chart1.BufferedDisplay := True;

Re: Mobile Performance

Posted: Tue Mar 04, 2014 3:16 pm
by 16567863
If use BufferedDisplay = true, characters look like this (smeared)
image1.png
image1.png (24.25 KiB) Viewed 25474 times
If I use BufferedDisplay = false characters look OK - like this: (clear)
Image2.png
Image2.png (17.6 KiB) Viewed 25469 times

Re: Mobile Performance

Posted: Thu Mar 06, 2014 11:10 am
by yeray
Hello,

This is a known effect. Maybe you can vote for this report at Embarcadero's QC:
http://qc.embarcadero.com/wc/qcmain.aspx?d=122373

We also suspect FMX may be doing something wrong when the destiny canvas is a TBitmap (BufferedDisplay=True) giving blurred texts. We're investigating this.

Re: Mobile Performance

Posted: Fri May 09, 2014 11:36 am
by 16568309
I am using Delphi XE6 with the beta version of TChart, working in iOS.

I am testing on an iPad Mini (non Retina) and an iPad 3 (Retina)

if I use a normal chart with no workarounds, performance is very poor on all scrolling/animated areas, eg. Tab transitions, scrollboxes - this is true for both devices.

If I use Chart.Buffered := True, all the performance problems go away on the Mini with non Retina display, and charts are clear.

But - on a retina display iPad, while performance is also good, the charts are all blurry, and not really acceptable.

I'm really hoping there's a workaround that allows me to get clearly displayed charts and still retain acceptable performance on retina displays?

Thanks
Richard

Re: Mobile Performance

Posted: Fri May 09, 2014 3:56 pm
by yeray
Hi Richard,
RichardS wrote:If I use Chart.Buffered := True, all the performance problems go away on the Mini with non Retina display, and charts are clear.

But - on a retina display iPad, while performance is also good, the charts are all blurry, and not really acceptable.
We don't have any iPad 3 retina here. I've tried it in the simulator and I can't see the blurred effect in the chart in it.
We can reproduce the problem in two different Android devices though.

Re: Mobile Performance

Posted: Fri May 09, 2014 4:16 pm
by 16568309
I hadn't thought of the Simulator, but actually I can reproduce a bit of the problem there - it is actually worse on the device, but can you see the difference quite clearly in quality.
NonRetina.png
Non Retina
NonRetina.png (31.64 KiB) Viewed 25210 times
Retina.png
Retina
Retina.png (44.67 KiB) Viewed 25221 times

Re: Mobile Performance

Posted: Mon May 12, 2014 10:49 am
by yeray
Hello,

Right, switching to iPad Retina simulator I could also reproduce the problem.
We're investigating this further.

Re: Mobile Performance

Posted: Mon May 12, 2014 12:33 pm
by 16568309
For now I think I have worked around the problem like this:

- Created a hidden form which has the chart(s) on it I want
- Added a method to this form which uses Chart.TeeCreateBitMap to return Bitmaps at both "normal" height and width and "2x" height and width
- Used a TImage component with TBitmaps for both 1x and 2x resolutions, and assigned the results of the function to them

So basically I create 2 copies of the chart at different sizes as bitmaps, and display the bitmaps rather than the Chart itself. The TImage component seems to correctly select and display the 1x or 2x resolution image depending on the device.

This solves any scrolling/performance issues - scrolling the images on THorzScrollBox is now very smooth. Creating the TBitmap is a bit slower than I'd like (about 0.25 - 0.30 of a second on an iOS device, as opposed to 0.05 on Windows) but I guess that is purely hardware related.

Would be nice if there was some way TChart could do this "out of the box", but hope this helps somebody in the meantime.

Richard