title: Why HTML/Web UI response slower than Native UI?
body: <p>I can't understand, Why HTML/Web UI response slower than WinForms/WPF/Android View/Native UI?</p>
  
  <p>The Native UI also have styles, elements nesting, events than the CSS, DOM, javascript events of the Web UI.</p>
  
  <p>Event response time includes: focus changing, dropdown, scrolling, animation moving, animation resizing, etc.</p>
  
  <p>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).</p>
  
  <p>I releazied maybe the biggest factor that slowdown event response is:</p>
  
  <ol>
  <li>The UI locking between parallel javascript processes;</li>
  <li>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);</li>
  <li>The html layout method (for example: css cascading, inline flow layout, responsive layout etc) may slow down partial UI updating.</li>
  <li>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(<a href="http://developer.android.com/reference/android/view/LayoutInflater.html" rel="noreferrer">http://developer.android.com/reference/android/view/LayoutInflater.html</a>)</li>
  </ol>
  
  <p>A subset of HTML and CSS standards maybe the future solution for webview app development:</p>
  
  <p><a href="http://www.silexlabs.org/haxe/cocktail/" rel="noreferrer">http://www.silexlabs.org/haxe/cocktail/</a></p>
  
  <p><a href="http://www.terrainformatica.com/htmlayout/" rel="noreferrer">http://www.terrainformatica.com/htmlayout/</a></p>
  
  <p><a href="http://www.nativecss.com/" rel="noreferrer">http://www.nativecss.com/</a></p>
  
  <p><a href="http://www.pixate.com/" rel="noreferrer">http://www.pixate.com/</a></p>
  
  <p><a href="https://github.com/tombenner/nui" rel="noreferrer">https://github.com/tombenner/nui</a></p>
  
  <p><a href="http://steelratstory.com/steelrat-products/wrathwebkit" rel="noreferrer">http://steelratstory.com/steelrat-products/wrathwebkit</a></p>
  
  <p><a href="http://trac.webkit.org/wiki/EFLWebKit" rel="noreferrer">http://trac.webkit.org/wiki/EFLWebKit</a></p>
  
  <p><a href="https://github.com/WebKitNix/webkitnix" rel="noreferrer">https://github.com/WebKitNix/webkitnix</a></p>
  
  <p><a href="http://qt-project.org/doc/qt-4.8/richtext-html-subset.html" rel="noreferrer">http://qt-project.org/doc/qt-4.8/richtext-html-subset.html</a></p>
  
  <p><a href="http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/" rel="noreferrer">http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/</a></p>
  
  <p>A pile of native UI markup languages:  <a href="http://en.wikipedia.org/wiki/User_interface_markup_language" rel="noreferrer">http://en.wikipedia.org/wiki/User_interface_markup_language</a></p>
  
  <p>why there is not a simplified HTML standard and a simplified Webcore layout engine to replace these native UIML?</p>
  
  <p>Maybe we could realize a subset html in kivy.org project.</p>
  
  <p>PC, android browser = application thread + ui thread</p>
  
  <p>iOS browser = application thread + ui data thread + ui hardware thread(CoreAnimation/OpenGL ES)</p>
  
  <p>In ios browser, application thread could directly call ui hardware thread.</p>