Repository navigation
Conversation
One zip read and decoded in memory via the decompressZip callback replaces opening ~1200 files on start: 211 -> 120 ms with a warm file cache on Windows for MeshInspector's icons. scripts/pack_icons.py creates that zip for installers. ImageLoad::fromPng( std::istream& ) uses png_set_sig_bytes instead of seeking back, so it accepts non-seekable streams. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Decoding takes most of the loading time: 120 -> 53 ms on Windows for MeshInspector's 1205 icons; the textures are still created on the calling thread. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
RibbonIcons::load()now looks forresource/icons.zipand, if it exists, loads every icon type from it in one pass: the entries are read through thedecompressZipcallback overload (#7102), the PNGs are decoded in memory in parallel, and the textures are created on the calling thread. Entries are<type folder>/<size folder>/<name>.png, the same layout as the folders, relative toresource/. Without the zip the per-folder scan is unchanged (Logos stay lazy).scripts/pack_icons.py <resource_dir>packsicons/,object_icons/,independent_icons/,logos/intoicons.zip(stored: PNG is already compressed) and deletes the folders; the MeshInspector installers will call it at packaging time.ImageLoad::fromPng( std::istream& )reports the consumed signature withpng_set_sig_bytesinstead of seeking back to 0, so it accepts non-seekable streams.MRViewer.RibbonIconsFromZip.Timing on Windows, MeshInspector's 1205 icons, warm file cache, no GL upload, min of 7 runs:
A cold cache or antivirus scanning makes the per-file cost higher still. What remains is the zip read and the per-icon texture setup.
🤖 Generated with Claude Code