Repository navigation
Conversation
Every link was collected before the first three were tried, and a run of bare https:// names one link per byte, each running to the end of the text: 160 KB of it is 20,000 copies, 1.6 GB in all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Author
|
The red Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
fetch_msg_metadatacollected every HTTPS link in a message before it tried the first three. A run of barehttps://with no delimiter names one link per byte offset of 8, and each one runs to the end of the text. A 160 KB message ofhttps://repeated is 20,000 copies, 1.6 GB in all. The scan runs when the message is shown with link previews on, so a peer could send it. On a relay that accepts large events, a few hundred KB is enough to run the machine out of memory.extract_https_urlsnow takes amaxand stops there. It is the same scan, and the first three links are the same as before. This applies to Tauri (src-tauri/src/util.rs, its one caller inmessage/mod.rs) and Vector Web (crates/vector-web/src/chat_ops.rs).Verification
https://: 1.6 GB and 49 s (debug) before, under 1 ms now.while letturned into a boundedloopwithlet … else, and a new argument at each call site.The GPUI port carries the same fix (
crates/vector-gpui/src/backend/unfurl.rsongpui, a lazy iterator), with the equivalence test in its suite.Generated by Claude Code