Repository navigation
Conversation
相关 issue #25:#25 块定义级细分缓存(BlockTessCache):InsertEntity::Draw 画每个阵列单元前问 IDrawSink::BeginBlockInstance, DrawContext 命中就把记下的结果经平移、旋转接上,不再克隆、逐个画块内子实体。 - 键:块定义、块参照的颜色 / 线型 / 线宽 / 图层(块内 ByBlock 与 0 层随它)、插入变换去掉旋转平移后的部分 (线型在变换之后按世界长度铺,缩放、镜像不同的不能共用) - 记录期间输出按世界坐标双精度另记一份,换回块坐标 × 缩放存下,接上时再落成 float;区域覆盖在原位置调用 Wipe - 不记:按像素烘焙的、纹理文字、图像、绝对角度的线型符号、分段停在块中间的、只展开一次的块 - 裁剪框(XCLIP)里:ClipDrawSink 带上本层裁剪框转发,按记下的输入范围判断整个在框内(原样接上)、 框外(跳过)、跨边(逐个画);框里照常记录,裁剪框改动了内容时经 NoteClipped 作废 - 分段细分:命中缓存时分段序号跳过这个块的直接子实体个数、进度加上叶子子实体个数 - Editor 只在成批细分时留着(分帧细分期间、一次全量拼接里),图纸一改动就清空;视口合成不用 本机 --bench(与旧版交替各两次):画全 CK-05 2.32 → 2.15 s、CK-T 3.71 → 3.26 s,模型页、布局页截图逐字节相同。 收益不大:重复的多是便宜的线、圆弧、多段线,贵的填充、单行文字几乎都只出现一次。 测试:BlockTessCacheTests(各种插入变换、ByBlock 与 0 层、嵌套、虚线、文字、区域覆盖,裁剪框内 / 外 / 跨边, 分段细分里命中缓存,均与不缓存时相同);ProgressiveBuildTests 加同步细分开 / 关缓存对比。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
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.
v0.5.1 还没打标签,这个提交补进 v0.5.1:发布说明
docs/release-notes/v0.5.1.md的"性能"一节已加一条、"开发与测试"已补上。相关 issue #25(大图纸打开后显示慢)。PR #26 让大图纸先显示、边细分边画,但画全的总时间反而长了 20%~35%;这次让同一块定义只细分一次,抵回一部分。总时间仍比分帧以前长,所以不关闭 issue。
改动(ec64f99)
BlockTessCache):InsertEntity::Draw画每个阵列单元前问IDrawSink::BeginBlockInstance,DrawContext命中就把记下的结果经平移、旋转接上,不再克隆、逐个画块内子实体WipeClipDrawSink带上本层裁剪框转发IDrawSink::NoteClipped作废这次记录效果(本机 GTX 1060 / D3D12,
--bench,与旧版交替各跑两次)验证
MiniCADTests全部通过(1800 项)BlockTessCacheTests:各种插入变换、ByBlock 与 0 层、嵌套、虚线、文字、区域覆盖;裁剪框内、框外、跨边;分段细分里命中缓存。均与不缓存时相同ProgressiveBuildTests加了同步细分开 / 关缓存的对比--selftest:新旧版都只有同样 3 项失败(拖动窗口跟着光标走,依赖真实鼠标),其余通过🤖 Generated with Claude Code