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

Shrink reprs #11

Closed
aazuspan opened this issue Nov 14, 2022 · 0 comments · Fixed by #12
Closed

Shrink reprs #11

aazuspan opened this issue Nov 14, 2022 · 0 comments · Fixed by #12
Assignees
Labels
performance Optimizations that affect perforrmance but not functionality

Comments

@aazuspan
Copy link
Owner

HTML reprs get big fast and can bloat notebook sizes. I tried minifying in #10 and found it wasn't worth the processing time, but there were some free optimizations that could have comparable effects.

Try shortening CSS class names and simplifying frequently repeated HTML elements to drop repr sizes.

Benchmark:

obj = ee.ImageCollection("COPERNICUS/S2_SR").limit(1000)
rep = obj._repr_html_()
mb = len(rep) / 1e6
mb 
# 68.84692
@aazuspan aazuspan added the performance Optimizations that affect perforrmance but not functionality label Nov 14, 2022
@aazuspan aazuspan self-assigned this Nov 14, 2022
aazuspan added a commit that referenced this issue Nov 14, 2022
Shorten CSS class names and remove unused classes to shrink HTML
repr size as much as practical.
@aazuspan aazuspan mentioned this issue Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Optimizations that affect perforrmance but not functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant