Khawar
Khawar

Reputation: 859

aChartEngine works real slow with large data

I'm working on achartengine (achartengine-1.0.0) in android app, it works fine with small data like <= 600, but when I draw points about 2000+ ( will use about 8000 or more), graph gets real slow!! even if user waits for delay but when touches it and moves the graph, graph takes quite long again!

How can I get rid of this slowness?

Thanks in advance

Upvotes: 3

Views: 1506

Answers (2)

JordiJansen
JordiJansen

Reputation: 128

As Leco mentioned in the comments above, removing setLineWidth() or setting it to a lower value did improve the performance a lot.

Upvotes: 0

Dan D.
Dan D.

Reputation: 32391

The 1.1.0 version has a set of performance improvements included. You can download this version here.

Most of the time is spent on rendering, so this is where you can improve things:

  • Disable antialiasing mRenderer.setAntialiasing(false);
  • Don't use PointStyles

Other suggestions:

  • Add only data that is to be displayed into the model. How does a chart with 2000 points look like?

Upvotes: 2

Related Questions