I can't understand, Why HTML/Web UI response slower than WinForms/WPF/Android View/Native UI?

The Native UI also have styles, elements nesting, events than the CSS, DOM, JavaScript events of the Web UI.

Event response time includes: focus changing, dropdown, scrolling, animation moving, animation resizing, etc.

The DOM tree insertion/replacing is also slow, inserting 10000 chars html will cost 100 ms in Google Chrome in Android 4.0 while parsing its template only cost 20 ms (jQuery micro template).

I realized maybe the biggest factor that slowdown event response is:

  1. The UI locking between parallel JavaScript processes;
  2. The rendering engine is too slow to process the new UI changing messages from JavaScript workers, especially when the browser rendering engine is busy with the last UI updating(because of the point 3);
  3. The html layout method (for example: CSS cascading, inline flow layout, responsive layout etc) may slow down partial UI updating.
  4. Parsing html/XML cost long time, a hint: Android view inflation relies heavily on pre-processing of XML files that is done at build time (http://developer.android.com/reference/android/view/LayoutInflater.html)

A subset of HTML and CSS standards maybe the future solution for webview app development:

http://www.silexlabs.org/haxe/cocktail/

http://www.terrainformatica.com/htmlayout/

http://www.nativecss.com/

http://www.pixate.com/

https://github.

Edit
Report