bitflicker64 commented on code in PR #835:
URL:
https://github.com/apache/hugegraph-toolchain/pull/835#discussion_r4349528720
##########
.licenserc.yaml:
##########
@@ -63,6 +63,7 @@ header: # `header` section is configurations for source codes
license header.
- '**/*.txt'
- '**/*.csv'
- '**/*.json'
+ - 'docs/performance/2026-10-22-hubble-hstore/**/*.jsonl'
Review Comment:
Important: `apache-release.sh` builds the source release with plain `git
archive`, and `.gitattributes` export-ignores `/hugegraph-hubble/docs/images/`
but not `docs/`. So all 137 files under docs/performance go into the source
tarball (2.88 MB -> 8.84 MB). The bulk is trace.jsonl.gz (2.32 MB) and 24 PNGs
(3.29 MB), which do not compress further. The binary package is not affected.
ASF sets no size limit, so this does not block a release. The reason to trim
before merge is history: once merged, every clone keeps these blobs even if a
later commit deletes them. A small fix: drop trace.jsonl.gz (and its
README.md:136 link) and the 16 PNGs no .md file links (2.20 MB), and add
`/docs/performance/ export-ignore` to `.gitattributes`. The samples and
summaries are small and back the tables, so they and this line can stay.
##########
docs/performance/2026-10-22-hubble-hstore/scripts/comparison_benchmark.py:
##########
@@ -0,0 +1,67 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Direct, fixed-encoding before/after Hubble measurements; no retained
response bodies."""
+import argparse, collections, gc, json, math, pathlib, re, statistics, time
+import requests
+ROOT=pathlib.Path('/workspace/hubble-perf')
Review Comment:
Minor: this and 10 other scripts in this directory, plus
comparison/final-followup/review_followup_assertions.py, hard-code
`/workspace/hubble-perf`, so they only run on the original host.
browser_benchmark.py, profile_canvas.py and two others already take
`--output-dir`. The same option, or one environment variable read in each
script, would let others rerun the rest.
##########
docs/performance/2026-10-22-hubble-hstore/TODO.md:
##########
@@ -0,0 +1,51 @@
+# 性能优化 TODO 与验收
+
+本轮以本地源码编译的 Hubble + PD + hstore Server 为准,保持现有同步/异步入口,不引入新结果服务。任务采用独立 worktree
实现,集成后复测。所有耗时收益以同协议的新基线对比为准。
+
+## 本轮交付
+
+- [x] 固化原始报告、调用拆分及优先级,确认默认 300 条、画布最多 1000 个点的产品规则。
+- [x] 建立查询后端、查询前端、空间/图列表三个独立 worktree,安排独立代码审查。
+- [x] **P0 查询后端**:普通读取默认 300 条并提示;计数、聚合、写操作及异步执行保持语义。
+- [x] **P0 图视图**:服务端提前截断到最多 1000 个唯一顶点;边遵守现有限额;补查全局停止;已有端点不重复补查。
+- [x] **P0 查询前端**:提交前提示明显超过交互范围的结果,复用异步任务;绘制前再次截断;明确部分预览。
+- [x] **P1 JSON/表格处理**:按激活视图处理数据,预览先截取再转换,避免先遍历/序列化完整大结果。
+- [x] **P0 导航**:空间/图选择器只取必要元数据,不加载全量统计和 Schema;保留匿名、普通用户、管理员权限边界。
+- [x] **P1 图列表**:先排序分页,再处理当前页统计/Schema,避免 page_size=1 仍扫描全部图。
+- [x] **审查与修复**:检查 limit 语义、异步不重放、边端点、权限、兼容和返回字段;处理所有可复现问题。
+- [x] **测试与构建**:后端单元测试、前端相关测试、正式前端构建;验证代码风格。
+- [x] **本地对比**:1000 空间、50 图;64 B / 8 KiB 属性、12000 点边;记录请求数、P50/P95、响应字节及剩余限制。
+- [x] **Chrome 验证**:匿名模式、登录/账号路径降级、空间/图切换、默认上限、大查询引导、截断与属性只读提示,保留截图;另建隔离 PD
认证夹具,真实管理员/普通成员登录、查询、权限可见性、注销均通过。
+- [x] **代码 PR**:列表
[#78](https://github.com/hugegraph/hugegraph-toolchain/pull/78)、查询/大属性预览
[#79](https://github.com/hugegraph/hugegraph-toolchain/pull/79)、Server 缓冲区
[#327](https://github.com/hugegraph/hugegraph/pull/327);[实测报告
#80](https://github.com/hugegraph/hugegraph-toolchain/pull/80)。
+
+集成验证已通过后端服务/Controller/查询回归、前端查询/选择器/TopBar/布局测试及生产构建。审查和实测进一步推动修复了局部 limit
误判、预览上游未限量、截断标记遗漏、力导向固定迭代和旧 TopBar 隐式全量统计。普通只读预览在上游限制为 1001 条,保留 1
条用于判断是否截断;最终最多交付 1000 条。详见优化对比和原始记录。
+
+## 用户补充:大属性可视化预览
+
+- [x] `preview:true` 字符串最多 256 字符并注明原始长度;大二进制值只返回大小说明;超长 Map 键整项省略并明确标记;集合最多
20 项、深度最多 4 层,每次查询共享10,000个属性/通用值投影预算(不是总字节上限)。实际点边标识、数值精度、路径顺序保持不变。
+- [x] JSON/Table/Graph 使用脱离 SDK 数据对象的预览副本,禁止意外触发属性写入;未启用 preview
的属性返回保持兼容,存储原值不变。
+- [x] 截断预览只读,导出/本地适配器重新载入保留标记;实际数据库导入接口明确拒绝预览文件。仓库没有服务端保存画布功能;普通完整属性仍可编辑。
+- [x] 真实 100 KiB / 1 MiB 文本属性与 256/257 字符边界、长 ID/BigInt 的响应大小、原值校验和 Chrome
交互验证;二进制预览由单元测试覆盖,没有声称真实二进制 API/Chrome 夹具验证。
+
+- [x] **最终 Review 补测**:聚合后展开、Map 键过滤、边 sentinel、Cypher 分组大 LIMIT
预检及查询错误消息2048字符上限;后端查询/投影55项、异常/历史19项分组回归,最终mapper小修20项重叠定向回归;局部归约/显式界限5项真实
API、原值完整性复核及6项采样脚本负向测试通过。
+
+## 最终交叉审查与统计收敛
+
+- [x]
查询默认上限/预览共享解析规则;图构造前完成投影,已有预览属性不重复扣预算。1000顶点×10属性同一测试在移除跳过逻辑后失败、恢复后通过,未跳过测试。
+- [x] 图/空间核心信息不等待统计或Schema;默认读取缓存/已有快照,没有快照时显示未统计,不执行点边扫描。
+- [x]
显式统计使用每类最多100000个点/边的`groupCount().by(label)`,提示可能近似;按实际Server、授权身份、空间和图隔离30分钟缓存,不将不同连接/身份的结果混用;复用Guava,最多1024项并在写入30分钟后过期,实际清理和容量驱逐已测,既有异步任务map保持独立。
+- [x]
只读保护按元素生效:只有属性被裁剪的点/边只读,完整元素仍可编辑;SDK元素ID与预览元数据在真实JSON中均为字符串。混合2点夹具实际Chrome确认完整点Edit可用、部分点Edit禁用、无PUT/PATCH,原值SHA不变。
+- [x]
最终后端集成186项、前端同组合18组/401项及生产构建通过;查询8项API、属性原值、统计7次调用、统计等待时导航可用和默认300/切图真实检查通过。详见[最终验证补充](VALIDATION.md#最终交叉审查与按需统计补充),不改写历史性能样本。
+
+## 明确后续事项
+
+- [ ] 统计长期方案:评估PD提供近似值、OLAP定期更新及已有快照消费;本轮只完成默认不扫描、手动有界统计及短缓存,不新建定时统计系统。
+- [ ] Server 提供经过授权的空间精简列表:当前匿名/普通用户逐空间详情调用若仍存在,应如实报告,不通过 admin-only 接口绕过。
+- [ ] Cypher 的默认结果上限与同步预览:本轮只为 Gremlin 增加 default300/preview 契约;Cypher
仅共享图视图上限及常见大 LIMIT 前端提示,不宣称无界 Cypher 已有完整保护。
Review Comment:
Minor: this says only Gremlin got the default 300 and preview contract, but
#833 applies both to Cypher too (`QueryService.java:153-155` passes
`gremlin.suffix_limit`, default 300, and `GRAPH_VERTEX_LIMIT + 1` to
`ReadOnlyCypher.preview`). VALIDATION.md:58 already says Cypher defaults to 300.
While here: line 19 and VALIDATION.md link the fork PRs
(hugegraph/hugegraph-toolchain #78/#79/#80, hugegraph/hugegraph #327). The
upstream ones are #832, #833, this PR and apache/hugegraph #3390.
VALIDATION.md:3, :7 and :18 also cite 1ea4a9bb, 3e9d20fa and 1bae746a, which do
not exist in this repo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]