fix: splitter fails for local file catalog items#7762
Open
Conversation
Store local file data as blob URLs in the url trait instead of private instance fields. This ensures duplicateModel() preserves the data since traits are copied during duplication.
Collaborator
Author
|
Deployment is failing due to the branch name |
Collaborator
Author
Collaborator
|
Hi @zoran995 - both PRs look good to me. One thing to check with this approach is whether it causes unnecessary duplication of memory because we are creating an object URL and then (here's a sizable geojson file for testing) |
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 this PR does
Fixes #7757
Store local file data as blob URLs in the URL trait instead of private instance fields, and follow the same approach already used for GLTF and Assimp catalogue items. This ensures duplicateModel() preserves the data since traits are copied during duplication. One potential downside of this approach is that we are currently not disposing the catalogue items from memory on remove (here is a ticket to track that #4816)
Test me
How should reviewers test this? (Hint: If you want to provide a test catalog item, create a Gist of its catalog JSON, add its url and your branch name to this url:
http://ci.terria.io/<branch name>/#clean&<raw url of your gist>, and then paste that in the body of this PR)Checklist
doc/.