quarto-dev / quarto-dev/quarto-cli
latex pattern for raw table treatment is checked twice in Lua : perf improvement ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I just noticed this while reading code.
For raw LaTeX Table, we do process table patterns, only when found
though we also do the exact same inside the function call
https://github.com/quarto-dev/quarto-cli/blob/b42543e510ad01125d87be07eee380fd177dda68/src/resources/filters/quarto-pre/table-captions.lua#L202-L221
As those string matching were already a problem related to perf (#9733), maybe this is worth simplifying here to avoid the duplicate treatment
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect src/resources/filters/quarto-pre/table-captions.lua at the cited ranges around lines 171-181 and 202-221. Compare the raw LaTeX table pattern checks and confirm that the duplicate matching can be removed while preserving the existing treatment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100