Skip to content

Polished faster regexes - #3090

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

Palloxin wants to merge 42 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] No separate new issue blocks the latest change; the earlier search-preview fix remains incomplete.

Summary

The PR replaces several regex operations with simpler patterns or replaceAll calls. The latest change restores escaped line-break characters in search previews.

  • File details show counts from updated text splits.
  • Editor text keeps its line endings through simpler replacements.
  • Path and address helpers use updated separator and hash replacements.
  • Editor command names and shortcuts stay readable.
  • Theme and language IDs keep their familiar spellings.
  • Search results still mark line breaks with ⏎.
  • Small text helpers use simpler replacement patterns.

Reviews (4) · Last reviewed commit: "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