Last active
March 24, 2016 19:21
-
-
Save ebidel/5b6018b9709d0ffcf3ee to your computer and use it in GitHub Desktop.
HTML Imports Resource Timing performance
This file contains 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
// Know how fast your HTML Imports are. | |
// crbug.com/505279 - doesn't show sub-import resources. | |
var imports = document.querySelectorAll('link[rel="import"]'); | |
[].forEach.call(imports, function(link) { | |
var entries = performance.getEntriesByName(link.href); | |
console.info('=== HTML Imports perf ==='); | |
entries.forEach(function(e) { | |
console.log(e.name, 'took', e.duration, 'ms'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment