Skip to content

Save As .dive.zip#695

Draft
hysw wants to merge 3 commits intogoogle:mainfrom
hysw:save_zip
Draft

Save As .dive.zip#695
hysw wants to merge 3 commits intogoogle:mainfrom
hysw:save_zip

Conversation

@hysw
Copy link
Collaborator

@hysw hysw commented Jan 7, 2026

No description provided.

hysw added 3 commits January 8, 2026 13:11
- Add a dive aware archive extractor.
- Extract content to temp file if we opened an archive.
- Update path lookup logic.
@wangra-google
Copy link
Collaborator

i think my biggest concern is that the gfxr and gfxa file could be quite large, compressing them through zip would be really slow? from user perspective that could be a bad experience especially the most common use case is to "save as" the smaller files like .csv files that are from the Replay (for perf counter with different counter set, or maybe remeasure the gpu time), rather than the .gfxr and .gfxa that are from the Capture since they won't be overwritten by Analysis.

archive_entry_copy_stat(entry.get(), &st);

archive_write_header(writer.get(), entry.get());
WriteArchiveEntry(writer.get(), infile);
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we check the return value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably, this is still a draft.

@hysw
Copy link
Collaborator Author

hysw commented Jan 9, 2026

i think my biggest concern is that the gfxr and gfxa file could be quite large, compressing them through zip would be really slow

Zip has a storage mode which nothing is compressed. Tar does not do compression. Having zip format means I can stop waiting for drive to compress all the file into a zip and extract them later

from user perspective that could be a bad experience especially the most common use case is to "save as" the smaller files like .csv files that are from the Replay

If you need to csv files, you can just copy the csv file.

@wangra-google
Copy link
Collaborator

i think my biggest concern is that the gfxr and gfxa file could be quite large, compressing them through zip would be really slow

Zip has a storage mode which nothing is compressed. Tar does not do compression. Having zip format means I can stop waiting for drive to compress all the file into a zip and extract them later

from user perspective that could be a bad experience especially the most common use case is to "save as" the smaller files like .csv files that are from the Replay

If you need to csv files, you can just copy the csv file.

My concern is the consistency of the user experience. If we argue that "Save As" is necessary because manual file copying is a hassle, that logic should apply to the .csv too. Telling users "just open the folder and copy the csv manually if you want that" undermines the purpose of having a "Save" feature in the UI. If a user clicks "Save As" expecting to save their current analysis (the lightweight .csv), but the tool forces them to wait for a 2GB bundle to be written, that creates friction. I am still open to discussions on this, I just want to ensure we don't introduce a new option that ends up confusing users more than it helps.

@hysw
Copy link
Collaborator Author

hysw commented Jan 9, 2026

My concern is the consistency of the user experience. If we argue that "Save As" is necessary because manual file copying is a hassle, that logic should apply to the .csv too.

Yes, but you probably want "Export" csv instead of "Save As".

If a user clicks "Save As" expecting to save their current analysis (the lightweight .csv), but the tool forces them to wait for a 2GB bundle to be written, that creates friction.

Dive can't open a csv file, and I don't think "Open" a csv file makes sense.

I just want to ensure we don't introduce a new option that ends up confusing users more than it helps.

That's the argument to have it do exactly one thing - save everything into a bundle - and having csv export being a different menu item.

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