Save PDFs and SVGs with content hash#3024
Merged
NicoHinderling merged 2 commits intomasterfrom Dec 11, 2025
Merged
Conversation
trevor-e
approved these changes
Dec 11, 2025
| .appendingPathExtension(fileExtension) | ||
| try! data.write(to: fileURL) | ||
| } | ||
| // Save images that can be converted to CGImage |
Member
There was a problem hiding this comment.
Assuming that PDF/SVG fail the later CGImageDestinationCreateWithURL() calls? Just wondering if it's worth trying to fit this into images[imageId] at all, just a bit confusing that dictionary no longer contains all images.
Contributor
Author
There was a problem hiding this comment.
right, for SVGs CGImageDestinationCreateWithURL would return nil. For PDFs, the call would have succeeded, but the vector data would have been removed...
that said I realized this change can increase the size of ParsedAssets by a lot, so I've come up with a different lighterweight approach that achieves the same fix
4c5b870 to
7acd373
Compare
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.
Related to https://linear.app/getsentry/issue/EME-550/ios-insights-duplicate-files
Write PDF/SVG raw data to disk during asset catalog parsing to enable duplicate detection of SVG and pdf files