Improve CO² footprint #39

Open
opened 2 years ago by phryk · 1 comments
phryk commented 2 years ago (Migrated from rnd.phryk.net)
Owner

In the spirit of https://dannyvankooten.com/website-carbon-emissions/,
we should work at reducing poobrains' CO² footprint.

As a first step, we shall improve poobrains/themes/default/bg.svg,
which currently renders 1400 <use> elements for the hexagonal
background, leading to it being 4 times bigger than the compiled
main.scss, which (barring fonts) is the second largest theme resource.

SVG has some kind of pattern support and it should™ work for this,
greatly reducing filesize.

Additionally, firefox currently caches fonts, but not SVG theme resources,
this should also be fixed, if possible.

In the spirit of https://dannyvankooten.com/website-carbon-emissions/, we should work at reducing poobrains' CO² footprint. As a first step, we shall improve `poobrains/themes/default/bg.svg`, which currently renders 1400 `<use>` elements for the hexagonal background, leading to it being 4 times bigger than the compiled main.scss, which (barring fonts) is the second largest theme resource. SVG has some kind of pattern support and it should™ work for this, greatly reducing filesize. Additionally, firefox currently caches fonts, but not SVG theme resources, this should also be fixed, if possible.
phryk commented 2 years ago (Migrated from rnd.phryk.net)
Owner

Setting r.cache_control.private = True (in addition to the already present public = True) in poobrains.Poobrain.serve_theme_resources fixes the client-side caching issue. Coming in the next commit.

Setting `r.cache_control.private = True` (in addition to the already present `public = True`) in `poobrains.Poobrain.serve_theme_resources` fixes the client-side caching issue. Coming in the next commit.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.