Re: [android-developers] Bringing webview performance in line with browser app's?
I see the exact same thing and I'm baffled.
On Friday, May 20, 2011 8:00:10 PM UTC-7, themightychris wrote:
I'm developing apps with Sencha Touch and PhoneGap, which uses a
webview to wrap an HTML5 application. I have been finding though that
scroll and animation performance inside my app's webview is
consistently underperforming the same application loaded in the same
phone's web browser.I found a related discussion and have been experimenting with the code
I found in it:
http://stackoverflow.com/questions/3652583/enhance- webview-performance-should-be- the-same-performance-as- native-web-browser ...but have not found any improvements in performance. Here are two
apps where you can compare PhoneGap vs Browser performance for the
same code:
http://mobile.phillytechweek.com vs https://market.android.com/details?id=com.phillytechweek
http://draft.philadelphiaeagles.com vs https://market.android.com/details?id=com. philadelphiaeagles Is there anyone that can shed some light on the nature of this
disparity or how it can be closed?Here's what I'm currently working with:
----------------------public class MyApp extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty(" splashscreen", R.drawable.splash); super.init();
super.appView.
clearCache(true);
super.appView.getSettings().setCacheMode( WebSettings.LOAD_NO_CACHE);
super.appView.getSettings().setRenderPriority(WebSettings. RenderPriority.HIGH);
super.appView.getSettings().setSupportZoom( false);
super.appView.getSettings(). setSupportMultipleWindows( false);
super.appView.getSettings(). setBuiltInZoomControls(false); // disable caching
try
{
Method m = CacheManager.class.getDeclaredMethod(" setCacheDisabled",
boolean.class);
m.setAccessible(true);
m.invoke(null, true);
}
catch (Throwable e)
{
Log.i("MyApp","Reflection failed", e);
}super.loadUrl(
"file:///android_asset/www/ index.html");
}
}--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en --
Philip Martin Duguay
3714 Rue Sainte-Émilie
philip.duguay@mail.mcgill.ca
Montréal, QC H4C 1Z6
438.878.5788
Project Consultant, Insitut Agama Islam Negeri Ar-Raniry Legal Clinic Centre
Banda Aceh, IndonesiaResearch Intern, Institute for Health and Social Policy, McGill University
Montreal, CanadaProficiency in the French language, proficiency in Microsoft Office Suite, excellent interpersonal and cross-cultural skills, foreign travel and work experience in Africa, Asia, Europe, the Middle East and Latin America, motivational team building skills in multidisciplinary environments, excellent project implementation skills, well-versed in inclusive governance and management strategies, dual citizen of Canada and the United States of America
November 2007 – April 2008
Mine Action Capacity Building Officer, Mines Action Canada
Addis Ababa, Ethiopia
July 2006 – March 2007
Vice-President Internal, Dalhousie Student Union, Dalhousie University
Halifax, Canada
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home