Mobile Performance

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
RichardS
Newbie
Newbie
Posts: 7
Joined: Mon Jan 21, 2013 12:00 am

Mobile Performance

Post by RichardS » Sun Jan 12, 2014 9:09 am

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

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Mobile Performance

Post by Yeray » Tue Jan 14, 2014 11:50 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Jochem
Newbie
Newbie
Posts: 5
Joined: Wed Nov 20, 2013 12:00 am

Re: Mobile Performance

Post by Jochem » Tue Feb 25, 2014 4:24 pm

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.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Mobile Performance

Post by Yeray » Thu Feb 27, 2014 11:00 am

Hi,

Try with this:

Code: Select all

Chart1.BufferedDisplay := True;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Jochem
Newbie
Newbie
Posts: 5
Joined: Wed Nov 20, 2013 12:00 am

Re: Mobile Performance

Post by Jochem » Tue Mar 04, 2014 3:16 pm

If use BufferedDisplay = true, characters look like this (smeared)
image1.png
image1.png (24.25 KiB) Viewed 25472 times
If I use BufferedDisplay = false characters look OK - like this: (clear)
Image2.png
Image2.png (17.6 KiB) Viewed 25467 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Mobile Performance

Post by Yeray » Thu Mar 06, 2014 11:10 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

RichardS
Newbie
Newbie
Posts: 3
Joined: Mon Jan 20, 2014 12:00 am

Re: Mobile Performance

Post by RichardS » Fri May 09, 2014 11:36 am

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

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Mobile Performance

Post by Yeray » Fri May 09, 2014 3:56 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

RichardS
Newbie
Newbie
Posts: 3
Joined: Mon Jan 20, 2014 12:00 am

Re: Mobile Performance

Post by RichardS » Fri May 09, 2014 4:16 pm

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 25208 times
Retina.png
Retina
Retina.png (44.67 KiB) Viewed 25219 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Mobile Performance

Post by Yeray » Mon May 12, 2014 10:49 am

Hello,

Right, switching to iPad Retina simulator I could also reproduce the problem.
We're investigating this further.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

RichardS
Newbie
Newbie
Posts: 3
Joined: Mon Jan 20, 2014 12:00 am

Re: Mobile Performance

Post by RichardS » Mon May 12, 2014 12:33 pm

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

Post Reply