perf(xlsx): the sheet filter's attribute scan is slower since the parser-equivalent tokenizer

未关闭
#411 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

Start by profiling with npm run bench -w pivotkit-xlsx; the issue points to packages/pivotkit-xlsx/src/xml.js, especially eachAttr and tagEnd. Compare the results with the figures in docs/reference/plugins.md, then investigate ways to speed up the attribute scan while preserving what it accepts. Done means the benchmark figures are current, the scan is faster, and the advisory tests still pass.

由索引模型根据 Issue 内容生成。

描述

idea

read() of a sheet formatted down to row 900,000 got slower with the parser-equivalent tokenizer from the GHSA-c6vh-q36c-92r3 fix:

Commit read()
730e60a (before the fix) 0.66 s
9ec50d4 and later 0.80 s

Under V8 coverage it takes about twice as long. That pushed the old absolute time bound in the used-range test over its limit on CI, which #404 / #405 fixed.

Most of the time goes to eachAttr and tagEnd in packages/pivotkit-xlsx/src/xml.js. The benchmark figures in docs/reference/plugins.md (4.4 s / 4.0 s for the 52 MB case) predate the fix and may be stale.

To do:

  • Profile with npm run bench -w pivotkit-xlsx and update the docs figures.
  • Speed up the attribute scan without changing what it accepts. The equivalence with the parser is the security property, so the advisory's tests must stay green.
主要语言
JavaScript
星标
1
派生
1
平均合并
3 小时 34 分钟
30 天内合并 PR
213

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eizedev/pivotkit 的其他 Issue

查看 eizedev/pivotkit 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。