-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[g] 提升首屏性能 #1117
Labels
Comments
最后就是可以减少状态切换。可以看出大量的开销出在对于原生方法例如 这一点 ECharts 也在文章中提及: |
xiaoiver
added a commit
that referenced
this issue
Aug 10, 2022
xiaoiver
added a commit
that referenced
this issue
Aug 12, 2022
* feat: init annotation plugin * feat: create selectable ui * fix: change to the latest renderer plugin usage * feat: add drawers * feat: add draw & hover style * feat: support selectable rect * fix: move inheritable properties to parent group element #1108 * fix: use radial gradient cache in g-svg * feat: support marker-start/end in g-webgl * feat: support marker for polygon in g-webgl * fix: remove annotation * fix: resolve merge conflict * feat: support marker offset for path #1077 * chore: add test case for marker * chore: add integration testcase for marker * refactor: split selectable plugin from annotation * chore: add testcase for clippath * Publish - @antv/g-canvas@1.7.0 - @antv/g-canvaskit@0.6.0 - @antv/g-components@1.7.0 - @antv/g-devtool@0.10.0 - @antv/g-gesture@0.0.19 - @antv/g-image-exporter@0.5.0 - @antv/g-layout-blocklike@1.7.0 - @antv/g-math@1.7.0 - @antv/g-mobile-canvas-element@0.6.0 - @antv/g-mobile-canvas@0.7.0 - @antv/g-mobile-svg@0.7.0 - @antv/g-mobile-webgl@0.7.0 - @antv/g-plugin-3d@1.7.0 - @antv/g-plugin-a11y@0.4.0 - @antv/g-plugin-annotation@0.1.0 - @antv/g-plugin-box2d@1.7.0 - @antv/g-plugin-canvas-path-generator@1.1.0 - @antv/g-plugin-canvas-picker@1.7.0 - @antv/g-plugin-canvas-renderer@1.7.0 - @antv/g-plugin-canvaskit-renderer@1.1.0 - @antv/g-plugin-control@1.7.0 - @antv/g-plugin-css-select@1.7.0 - @antv/g-plugin-device-renderer@1.7.0 - @antv/g-plugin-dom-interaction@1.7.0 - @antv/g-plugin-dragndrop@1.6.0 - @antv/g-plugin-gpgpu@1.7.0 - @antv/g-plugin-html-renderer@1.7.0 - @antv/g-plugin-image-loader@1.1.0 - @antv/g-plugin-matterjs@1.7.0 - @antv/g-plugin-mobile-interaction@0.7.0 - @antv/g-plugin-physx@1.7.0 - @antv/g-plugin-rough-canvas-renderer@1.7.0 - @antv/g-plugin-rough-svg-renderer@1.7.0 - @antv/g-plugin-svg-picker@1.7.0 - @antv/g-plugin-svg-renderer@1.7.0 - @antv/g-plugin-webgl-device@1.7.0 - @antv/g-plugin-webgpu-device@1.7.0 - @antv/g-plugin-yoga@1.7.0 - @antv/g-shader-components@1.7.0 - @antv/g-svg@1.7.0 - @antv/g-web-components@1.7.0 - @antv/g-webgl@1.7.0 - @antv/g-webgpu@1.7.0 - @antv/g@5.7.0 - @antv/react-g@1.7.0 - @antv/g-site@1.7.0 * fix: custom element should trigger attribute changed callback after connected * fix: make clippath valid on ancestor #1109 * fix: picking should account for clippath on ancestor #1109 * fix: event on/off * Publish - @antv/g-canvas@1.7.1 - @antv/g-canvaskit@0.6.1 - @antv/g-gesture@0.0.20 - @antv/g-mobile-canvas@0.7.1 - @antv/g-plugin-annotation@0.1.1 - @antv/g-plugin-canvas-picker@1.7.1 - @antv/g-plugin-canvas-renderer@1.7.1 - @antv/g@5.7.1 - @antv/react-g@1.7.1 * fix: support relative length unit for dx/dy #1111 * Publish - @antv/g-canvas@1.7.2 - @antv/g-canvaskit@0.6.2 - @antv/g-gesture@0.0.21 - @antv/g-mobile-canvas@0.7.2 - @antv/g-mobile-webgl@0.7.1 - @antv/g-plugin-annotation@0.1.2 - @antv/g-plugin-canvas-renderer@1.7.2 - @antv/g-plugin-canvaskit-renderer@1.1.1 - @antv/g-plugin-device-renderer@1.7.1 - @antv/g-plugin-image-loader@1.1.1 - @antv/g-webgl@1.7.1 - @antv/g-webgpu@1.7.1 - @antv/g@5.7.2 - @antv/react-g@1.7.2 * fix: use native isPointInPath method first #1112 * fix: emit draw:move event * fix: disable drawing with right mouse * fix: downgrade Path / Polyline to Line for better perf in g-webgl #1113 * fix: apply filter to Image & Text correctly #1114 * chore: add testcase for filter * Publish - @antv/g-canvas@1.7.3 - @antv/g-canvaskit@0.6.3 - @antv/g-gesture@0.0.22 - @antv/g-mobile-canvas@0.7.3 - @antv/g-mobile-svg@0.7.1 - @antv/g-mobile-webgl@0.7.2 - @antv/g-plugin-annotation@0.1.3 - @antv/g-plugin-canvas-picker@1.7.2 - @antv/g-plugin-canvas-renderer@1.7.3 - @antv/g-plugin-device-renderer@1.7.2 - @antv/g-plugin-svg-renderer@1.7.1 - @antv/g-svg@1.7.1 - @antv/g-webgl@1.7.2 - @antv/g-webgpu@1.7.2 - @antv/g@5.7.3 - @antv/react-g@1.7.3 - @antv/g-site@1.7.1 * fix: use viewport point to render drawer * feat: interactive event such as PointerEvent and WheelEvent can be cloned #1115 * fix: draw rect with rotation * fix: copy event point * fix: account for camera rotation when clearing dirty rectangle #1116 * fix: reduce re-ordering on fcp #1117 * chore: update annotation docs Co-authored-by: yuqi.pyq <yuqi.pyq@antgroup.com> Co-authored-by: yuanzi <liaopei.lp@antgroup.com>
另外应当尽量减少对于 |
多余的事件传递可以精简,例如 |
14 tasks
xiaoiver
added a commit
that referenced
this issue
Jun 12, 2023
xiaoiver
added a commit
that referenced
this issue
Jun 12, 2023
* fix: change canvas' init hook frin async to sync #1117 * Publish - @antv/g-canvas@1.9.47 - @antv/g-canvaskit@0.8.44 - @antv/g-gesture@0.0.82 - @antv/g-lite@1.0.69 - @antv/g-mobile-canvas@0.8.55 - @antv/g-mobile-svg@0.8.59 - @antv/g-mobile-webgl@0.7.73 - @antv/g-plugin-3d@1.7.56 - @antv/g-plugin-a11y@0.4.51 - @antv/g-plugin-annotation@0.2.68 - @antv/g-plugin-box2d@1.7.52 - @antv/g-plugin-canvas-renderer@1.7.59 - @antv/g-plugin-canvaskit-renderer@1.1.53 - @antv/g-plugin-control@1.7.53 - @antv/g-plugin-device-renderer@1.7.69 - @antv/g-plugin-dom-interaction@1.7.51 - @antv/g-plugin-dragndrop@1.6.50 - @antv/g-plugin-html-renderer@1.7.55 - @antv/g-plugin-image-loader@1.1.53 - @antv/g-plugin-matterjs@1.7.52 - @antv/g-plugin-mobile-interaction@0.7.50 - @antv/g-plugin-physx@1.7.53 - @antv/g-plugin-rough-canvas-renderer@1.7.53 - @antv/g-plugin-rough-svg-renderer@1.7.55 - @antv/g-plugin-svg-renderer@1.8.59 - @antv/g-plugin-webgl-device@1.7.53 - @antv/g-plugin-yoga@1.7.50 - @antv/g-plugin-zdog-canvas-renderer@1.0.18 - @antv/g-plugin-zdog-svg-renderer@1.0.17 - @antv/g-shader-components@1.7.54 - @antv/g-svg@1.8.59 - @antv/g-webgl@1.7.73 - @antv/g-webgpu@1.7.72 - @antv/g@5.16.32 - @antv/react-g@1.8.78
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前在每一帧结束后,都会针对发生改变的节点重新构建 R 树,在这一过程中会重新计算脏节点的包围盒,是开销较大的环节:
但
g-canvas
的渲染在脏矩形同样在endFrame
这一 hook 中完成,且由于是顺序执行,因此需要等待上面构建 R 树完成后:但对于首屏来说并不需要等待这一过程,构建 R 树的目的也是为了后续脏矩形最小粒度更新以及快速拾取判定。
因此可以将该过程改成异步非阻塞,至少对于首次渲染应当如此。
The text was updated successfully, but these errors were encountered: