Skip to content

Polished faster regexes - #3090

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

Palloxin wants to merge 44 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 latest change appears safe to merge; it preserves Windows line conversion behavior.

Summary

The PR simplifies regexes and replaces fixed-text regex replacements with replaceAll.

  • File details calculate line and word totals with new split rules.
  • Editor and language-server text edits use direct line-ending conversions.
  • Search-result snippets choose how to display line breaks based on their text.
  • Editor and file workflows replace fixed text without global regexes.

Reviews (5) · Last reviewed commit: "truest complete" · Reviewed by Greptile

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

Copy link
Copy Markdown
Contributor Author

easy

Comment thread src/sidebarApps/searchInFiles/worker.js Resolved
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