Question

i need to use a charting library and after seeing lots of charting API i have to decide in Flot-For-Android and achartengine. Flot is in javascript so i will have to use a WebView and achartengine is in Java so i can use a simple View. Which of them will have better perfomance ? JavaScript or Java code in Android ?

Was it helpful?

Solution

Without having any concrete benchmarks to back me up, I would say that Java will be faster because the Dalvik virtual machine is optimized for mobile devices. However, the newer releases of the WebKit browser for Android include Google's V8 engine for JavaScript, which features just-in-time compiling, so the difference is probably insignificant.

I would recommend to pick whichever solution makes more sense for your UI design. If your app is wrapper around a browser-based solution, use the JavaScript-based library. If you want to integrate charting directly into your Android activities, pick a Java-based one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top