Skip to content

Comments

Use stream API rather than file copy#14

Merged
Meakk merged 1 commit intof3d-app:masterfrom
Meakk:many-improvements
Feb 18, 2026
Merged

Use stream API rather than file copy#14
Meakk merged 1 commit intof3d-app:masterfrom
Meakk:many-improvements

Conversation

@Meakk
Copy link
Member

@Meakk Meakk commented Feb 17, 2026

Use stream directly rather than copying temporary files to cache.

@Meakk Meakk self-assigned this Feb 17, 2026
@Meakk Meakk marked this pull request as draft February 17, 2026 12:59
@Meakk Meakk force-pushed the many-improvements branch from e0fdd71 to 5222733 Compare February 18, 2026 19:49
@Meakk Meakk marked this pull request as ready for review February 18, 2026 19:49
@Meakk Meakk changed the title [WIP] Add support for streaming Use stream API rather than file copy Feb 18, 2026
@Meakk Meakk requested a review from mwestphal February 18, 2026 19:52
try (InputStream inputStream = MainView.this.getContext().getContentResolver().openInputStream(mActiveUri)) {
if (inputStream != null) {
byte[] fileBytes = new byte[inputStream.available()];
inputStream.read(fileBytes);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suppose this copy is unavoidable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the best way I could find.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hat some point I considered adding a vtkIStreamResourceStream, would that help ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? Hard to tell at the moment but we'll most likely need a f3d::scene::add(std::istream& stream) api

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well of course, thats the easy part though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So yeah, I think that'd help here too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets open an issue about it

@Meakk Meakk merged commit 3f22e85 into f3d-app:master Feb 18, 2026
8 checks passed
@Meakk Meakk deleted the many-improvements branch February 18, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants