Why HTML/Web UI response slower than Native UI?

前端 未结 5 1348
天涯浪人
天涯浪人 2021-02-05 10:37

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

5条回答
  •  梦如初夏
    2021-02-05 10:39

    3 big differences

    1. WebUI apps are run within a browser, which then depends on how well the browser is optimized.

    2. The browser also has its own javascript jvm. another process that has to run and interpret the code before it runs.

    All of this is an extra layer that is on top of the native OS. If you were to bring up the activity monitor of you computer and bring up a web page in your browser, you will notice what a resource hog web browsers are.

    1. Native UI elements have graphics acceleration support. depending on the os, native ui templates are compiled to a native format that does not have to be parsed for rendering.

提交回复
热议问题