-
Notifications
You must be signed in to change notification settings - Fork 635
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
提升瓦片图层性能 #2258
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lzxue
approved these changes
Jan 17, 2024
lzxue
pushed a commit
that referenced
this pull request
Jan 18, 2024
* fix: add tile vector to ci * fix: add program cache for device model * chore: update tile vector snapshot
lzxue
pushed a commit
that referenced
this pull request
Jan 18, 2024
* fix: add tile vector to ci * fix: add program cache for device model * chore: update tile vector snapshot
剩下的问题主要集中在构建三角网以及后续创建 Attribute 上: |
是的,同行没有用 worker 的情况下,看上去用了什么魔法,其实用了控制粒度的管理 |
lzxue
added a commit
that referenced
this pull request
Jan 30, 2024
* chore: test loaded 完成后截图 * 提升瓦片图层性能 (#2258) * fix: add tile vector to ci * fix: add program cache for device model * chore: update tile vector snapshot * chore: 添加demo & 优化uniform 参数 按需设置 * fix: 合并冲突 * 提升瓦片图层性能 (#2258) * fix: add tile vector to ci * fix: add program cache for device model * chore: update tile vector snapshot * chore: 移除不必要的代码 * feat: add touchend & touchstart 事件 * chore: test ci CERT_HAS_EXPIRED * chore: 移除 taobao 镜像 * chore: 更新 test snapshots * fix: bmap zoom 不一致 * chore: touch 事件 * chore: 替换和优化resize 的相关方法 * chore: 更新淘宝镜像 * fix: demo 引用错误 --------- Co-authored-by: xiaoiver <yuqi.pyq@antgroup.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[English Template / 英文模板]
🤔 这个变动的性质是?
🔗 相关 Issue
在 Tile / vector 这个例子中开启全部 layer 后,度量性能发现 getProgramParameter 这个方法耗时很高:
本意是用作 ShaderDebug,底层会调用
gl.getProgramParameter(prog, gl.LINK_STATUS)
查询 Shader 编译状态,出错展示详细信息。另外在创建 Program 转译 Shader 时需要做缓存(ReglModel 和 DeviceModel 中都可以),否则在多个瓦片中多个同类图层都会重复进行处理。
💡 需求背景和解决方案
在 g-device-api 中提供开关关闭,仅在 Debug 时使用。升级到 1.6.1 即可:
https://github.com/antvis/g-device-api/releases/tag/1.6.1
另外为 Program 添加缓存避免重复的 Shader 编译。优化后可以看到提升效果:
📝 更新日志
☑️ 请求合并前的自查清单