Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

webview性能问题 #264

@hyfjjjj

Description

@hyfjjjj

1. 发现的主要问题如下:

  1. 打开一些长网页时页面滑动明显卡顿。
  2. 打开一个大网页,关闭页面,再次打开加载会明显比第一次慢特别多。

2. 解决方案:

  1. 问题1主要是renderMode引起的,现在是RenderMode.SYNC_RENDER,没法通过外部参数修改,手动修改此库源代码将renderMode改为RenderMode.ASYNC_RENDER后,滑动会变得非常顺畅。
  2. 问题2是renderProcessMode引起的,目前手机默认是RenderProcessMode.SINGLE,没法通过外部参数修改,手动修改此库源代码webview.WebviewController.setRenderProcessMode(webview.RenderProcessMode.MULTIPLE)后,第二个问题可以解决,但是不清楚为什么会这样,估计是鸿蒙本身的webview的bug引起的,和当前库没有关系。

3. 建议:

将默认值修改为上述能解决性能问题的参数,添加prop或函数,使react native js端可以手动控制。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions