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

Aberta
#411 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
javascript, node.js
Domínio
backend, performance

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.
Linguagem predominante
JavaScript
Estrelas
1
Forks
1
Merge médio
3h 34min
PRs com merge (30d)
213

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de eizedev/pivotkit

Todas as issues de eizedev/pivotkit

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.