Skip to content

Polished faster regexes - #3090

Open
Palloxin wants to merge 36 commits into
Acode-Foundation:mainfrom
Palloxin:patch-2
Open

Palloxin wants to merge 36 commits into
Acode-Foundation:mainfrom
Palloxin:patch-2

Conversation

@Palloxin

@Palloxin Palloxin commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

The only output change is that the word count (showfileinfo.js) increased by + 1
The replacement itself becamr 10-20% faster (I cant provide a super precise benchmark, I am able to use only jsbench.me website [It is precise and consistent regarding replacements and regex])

I cant provide before and after numbers.
Every commit has been made with the mobile ui of github website. I cant use dev tools well, nor have I skills to produce the benchmark.

The improvements are so simple that there is no need imo.

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

This PR replaces several regex operations with string replacements and simplifies other patterns.

  • File and editor text cleanup uses simpler replacements.
  • Theme and language-mode names use simpler replacement rules.
  • Command, theme, and shortcut labels use simpler formatting.
  • The file-info dialog derives line and word counts differently.
  • Console previews, heading links, and font names use narrower patterns.

Reviews (2) · Last reviewed commit: "tiny fix" · Reviewed by Greptile

Comment thread src/lib/showFileInfo.js Resolved
@Palloxin

Copy link
Copy Markdown
Contributor Author

easy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant