Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc0bb55e25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return; | ||
| } | ||
| const result = highlightLines(normalizedLines, language); | ||
| if (!cancelled) { | ||
| setHighlightedLines(result); |
There was a problem hiding this comment.
Skip syntax highlighting for very large files
The new effect always calls highlightLines(normalizedLines, language) without any size/line guard, so opening large text files (thousands of lines) will tokenize the entire file on the main thread and can freeze the UI even though the list rendering is virtualized. This is a performance regression for big files; consider reintroducing a line/size threshold or chunked/highlight-on-demand so large previews stay responsive.
Useful? React with 👍 / 👎.
No description provided.