Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID caching #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

UUID caching #114

wants to merge 2 commits into from

Conversation

gizatt
Copy link
Collaborator

@gizatt gizatt commented Apr 21, 2022

This pairs with meshcat js PR #115 to avoid re-sending geometry or materials with duplicate UUIDs while achieving the same visualization result.

This hopefully saves a ton of bandwidth, and also dramatically reduces static_html export size for scenes with many repeated heavy elements. For example, the attached scene with 1000 Stanford bunnies (generated by this script) serializes to ~1MB with this caching, but >100MB without.

save_with_caching.zip

Note that for this to be useful, you do have to make sure your geometries / materials are actually have the same UUID. (E.g. if you create a meshcat geometry from the same mesh data twice, that might not be true by default.)

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2022

Codecov Report

Merging #114 (3f7fc1a) into master (0f25add) will increase coverage by 0.58%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
+ Coverage   73.39%   73.97%   +0.58%     
==========================================
  Files          11       11              
  Lines        1075     1099      +24     
==========================================
+ Hits          789      813      +24     
  Misses        286      286              
Impacted Files Coverage Δ
src/meshcat/geometry.py 89.18% <100.00%> (+0.21%) ⬆️
src/meshcat/tests/test_drawing.py 98.00% <100.00%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f25add...3f7fc1a. Read the comment docs.

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