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

Offen
#411 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, node.js
Bereich
backend, performance

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
JavaScript
Sterne
1
Forks
1
Ø Merge
3 Std. 34 Min.
Gemergte PRs (30 T.)
213

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus eizedev/pivotkit

Alle Issues in eizedev/pivotkit

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.