Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Inline badges #312

Merged
merged 2 commits into from Oct 10, 2019
Merged

Inline badges #312

merged 2 commits into from Oct 10, 2019

Conversation

XhmikosR
Copy link
Collaborator

@XhmikosR XhmikosR commented Sep 4, 2019

@mozfreddyb: I have added 2 patches with different approaches. Let me know what you prefer.

The idea is that with this we reduce the requests and generally since the SVGs are small, this should be better.

@XhmikosR XhmikosR marked this pull request as ready for review September 30, 2019 11:26
templates/index.html Outdated Show resolved Hide resolved
@mozfreddyb
Copy link
Contributor

We're reducing the amount of requests, but the bytes will be more given that you'll now always download fail and pass. Right?

@XhmikosR
Copy link
Collaborator Author

I believe the total bytes is less with this patch.

@XhmikosR
Copy link
Collaborator Author

XhmikosR commented Oct 7, 2019

Here's the result locally

master:

9 requests
12.32 KB / 11.95 KB transferred
Finish: 264 ms
DOMContentLoaded: 49 ms
load: 208 ms

this:

7 requests
11.82 KB / 10.36 KB transferred
Finish: 114 ms
DOMContentLoaded: 34 ms
load: 51 ms

I'm just not sure

  1. which solution we should go with
  2. I need to check out the comments before merging this

Sort of hackish but if the partials have an SVG extension they are not included.

Also, remove the comment from the SVG files, otherwise it results in invalid HTML.
@mozfreddyb
Copy link
Contributor

Thanks for the measurements. I'm convinced :)

@mozfreddyb mozfreddyb merged commit 6e7b342 into master Oct 10, 2019
@mozfreddyb mozfreddyb deleted the xmr-inline-badges branch October 10, 2019 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants