Page | First Paint | Dom Load | On Load |
---|---|---|---|
Old- Php | 4.10 | 4.08 | 5.55 |
New - pJS | 1.22 | 2.34 | 4.24 |
- First paint is delayed in php orders. Check below
'use strict'; | |
const domain = 's3-eu-west-1.amazonaws.com'; | |
const crypto = require('crypto'); | |
function getMd5(str) { | |
return crypto.createHash('md5').update(str).digest('hex'); | |
} | |
function getSha1(str) { |
To site a working example, we have built a streaming layout service which composes the page from multiple endpoints(microservices).
<html>
<head>
<fragment src="http://assets.domain.com" inline>
</head>
<body>
<fragment src="http://header.domain.com">
<fragment src="http://content.domain.com" primary>
<html> | |
<style> | |
@media screen and (max-width: 1024px){ | |
.agent { | |
opacity: 1 !important; | |
} | |
} | |
.agent { | |
opacity: 0; | |
} |
I hereby claim:
To claim this, I am signing this object:
'use strict'; | |
(function(Pipe, perf) { | |
if (Pipe === undefined) { | |
return; | |
} | |
if (!('mark' in perf && 'measure' in perf)) { | |
return; | |
} | |
var fragmentMap = Object.create(null); |
// From graphql-js, https://github.com/graphql/graphql-js/blob/499a75939f70c4863d44149371d6a99d57ff7c35/src/jsutils/isPromise.js#L18 | |
function isPromiseWithBoxing(value) { | |
return Boolean(value && typeof value.then === "function"); | |
} | |
// Tailor source - https://github.com/zalando/tailor/blob/0d930d30d6ea3936985ecf3714a3d93fa755b628/src/pipe.js#L53 | |
function isPromiseWithoutBoxing(value) { | |
return ( | |
value != null && | |
typeof value === "object" && | |
typeof value.then === "function" |
const observer = new PerformanceObserver(function(list) { | |
const entries = list.getEntries(); | |
// An example entry looks something like this | |
const exampleEntry = { | |
name: "same-origin-descendant", | |
entryType: "longtask", | |
startTime: 1023.40999995591, | |
duration: 187.19000002602115, | |
attribution: [ | |
{ |