• This repository has been archived on 07/Sep/2022
  • Stars
    star
    123
  • Rank 290,091 (Top 6 %)
  • Language
    HTML
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automatic web components profiling in chrome devtools

polydev

polydev is the Polymer DevTools Extension - a tool to help develop Polymer and custom elements. Currently it's focused on performance tracking of web components.

How to Use

  1. Install the extension.
  2. On a page that uses web components, make a timeline recording.
  3. Look under the User Timing section of the timeline to track time spent in custom element lifecycle callbacks, as well as time spent reacting to Polymer databinding changes.

How to read the results

Screenshot of a recorded timeline

Each web component lifecycle callback will be annotated as a span in the timeline called a measure, representing the time that it took. If a measure is below another measure, the lower callback took place during the higher callback.

Each measure that polydev produces has a unique name like [WC] created paper-icon-button 5. The format is [WC] callbackName tagName id. The id numbers are on a per instance and per tag basis and count up from zero.

API

polydev exposes a method on the host page called _getElementMeasures. It returns an array of ElementMeasure objects, which obey the following interface:

interface ElementMeasurement {
  tagName: string;
  operation: string;
  elementId: number|undefined;
  duration: number;
  start: number;
  end: number;
}

Development

Building

polydev must be built before running. The build step externalizes inline scripts for CSP compliance, and copies some dependencies into convenient locations.

To build, run npm run build:

> npm run build

The built project is available at build/polydev.

Installation

  1. Create a new Chrome profile
  2. Navigate to chrome://extensions
  3. Check the "Developer mode" checkbox
  4. Click "Load unpacked extension..."
  5. Choose polydev/build/polydev

Dev flow

When changing files in src/ the dev workflow should work cover most use cases.

> npm run dev

Depending on the change you can either then close and reopen the devtools, or if you've made a change to the content-script or to element-zones, you must reload both the extension and any page you're testing it on.

More Repositories

1

actor-boilerplate

A starting point for web apps based on the actor model.
TypeScript
424
star
2

wizzywid

What you see is what you deserve: a visual getting-started-tool for HTML, Custom Elements, and Polymer.
HTML
232
star
3

lit-ssr

Experimental SSR for lit-html and LitElement
TypeScript
120
star
4

actor-helpers

TypeScript
108
star
5

crisper

JavaScript
106
star
6

todo-list

Polymer Summit Todo List App
HTML
96
star
7

uni-virtualizer

Monorepo for a "universal" (renderer-agnostic) virtual scroller and renderer-specific variants
TypeScript
95
star
8

zuperkulblog-progressive

A Progressive Web App built in Polymer
HTML
75
star
9

start-lit-element

Hello World app for LitElement.
JavaScript
68
star
10

arcs

Arcs
Kotlin
57
star
11

books

JavaScript
54
star
12

start-polymer3

A Hello World app for Polymer 3.0
JavaScript
52
star
13

html-modules-toolkit

Transforming HTML standards of the future into JavaScript standards of the past
TypeScript
47
star
14

indie-catalog

A simple catalog for demoing web components
HTML
44
star
15

lit-element-build-rollup

Build config for lit-element with Rollup and Babel
JavaScript
35
star
16

brick-viewer

A web component for viewing models built with a certain type of plastic brick!
TypeScript
35
star
17

async-demos

TypeScript
30
star
18

ristretto

An extensible test runner ☕️
TypeScript
30
star
19

polyicon

Polymer custom icon generator
HTML
30
star
20

shady-css-parser

A fast, small and flexible CSS parser.
TypeScript
28
star
21

cheese

HTML
27
star
22

polyperf

Simple webpage performance testing harness
HTML
26
star
23

split-element

Lazy loaded LitElements
TypeScript
24
star
24

template-instantiation

TypeScript
23
star
25

tedium

A bot for doing mass changes to github repos for the Polymer team
TypeScript
20
star
26

part-theme

Experimental proof of concept shim for ::part/::theme css.
JavaScript
19
star
27

lit-mail

TypeScript
18
star
28

polymer-2-carousel

Codelab
HTML
18
star
29

polymer-3-first-element

Create your first element with Polymer 3
JavaScript
16
star
30

amp-viewer

JavaScript
16
star
31

blocking-elements

Expose a stack of blocking elements https://github.com/whatwg/html/issues/897
JavaScript
15
star
32

iron-overlay

Overlay element that overcomes the stacking context trap
HTML
13
star
33

tsc-then

Like `tsc -w` but it runs a command of your choosing when compilation finishes
TypeScript
12
star
34

polymon

Seek out Polymer team members and capture them as Polymon! https://polymon.polymer-project.org
HTML
10
star
35

hot-elements

An interface for custom element classes to implement hot module reloading
9
star
36

project-health

TypeScript
9
star
37

perf-tester

An element to help performance test other elements.
JavaScript
8
star
38

PolymerRenamer

The Polymer Renamer helps developers integrate the Google Closure compiler with their Polymer projects by forwarding renames performed by the compiler to HTML and JS files.
Java
8
star
39

x-slides

Experimental slide deck elements.
TypeScript
7
star
40

prpl-ce-firebase

PRPL with Firebase Codelab
JavaScript
6
star
41

lit-html-build

Example Rollup build for lit-html
JavaScript
6
star
42

generator-polymer-init-vanilla-web-component

A Yeoman generator that scaffolds a vanilla web component template
HTML
6
star
43

css-slam

Minimal CSS, fast
TypeScript
6
star
44

template-instantiation-experiments

TypeScript
5
star
45

release-image

Generate Tweetable images from changelogs
TypeScript
5
star
46

lazy-lit-element

Non-blocking rendering for LitELement & UpdatingElement
5
star
47

lit-ssr-workspace

A workspace for working on lit-ssr and related projects
5
star
48

vexflow-elements

Web components for the VexFlow music notation renderer
JavaScript
5
star
49

news-docs

Polymer News documentation
HTML
5
star
50

empathy

Installing NPM modules for your front-end project? Pathify them with Empathy.
5
star
51

webmat

Web + format = webmat
TypeScript
4
star
52

angular-element

Experiment: Web Components with Angular Ivy templates
TypeScript
4
star
53

lit-plugin-docs

CSS
4
star
54

cancel-token

Implementation of https://github.com/littledan/proposal-cancelable-promises
TypeScript
4
star
55

arcs-cdn

Repository to serve as cloud provider (via gh-pages) for primary Arcs artifacts
JavaScript
3
star
56

grimlock

TypeScript
3
star
57

web-component-project-layouts

HTML
3
star
58

show-more

Element handling collapsible content with animation keyframes
HTML
3
star
59

simple-input

JavaScript
3
star
60

gen-closure-declarations

TypeScript
3
star
61

polymer-closure-sample

JavaScript
3
star
62

story-viewer

TypeScript
2
star
63

.allstar

2
star
64

koa-importmap

A Koa middleware module that can rewrite import specifiers for JavaScript modules based on the reference/presence of an importmap in the HTML document originating the request.
1
star
65

lit-samples

HTML
1
star
66

loose-it

Pre build Polymer bindings and property effects
TypeScript
1
star
67

kaon-experimental

Experiments in ES6 and Web Components
TypeScript
1
star
68

multitenant-prpl

prpl-server as a library test
HTML
1
star
69

story-viewer-starter

HTML
1
star
70

.github

1
star
71

async-dom

Async DOM APIs
HTML
1
star
72

template-benchmarks

A set of templating-related microbenchmarks
1
star
73

form-participation

Polyfill for the Form Participation API
TypeScript
1
star
74

polycasts

Source code for all your favorite polycasts!
HTML
1
star
75

awesome-sauce

A demo of an element with a documentation page.
JavaScript
1
star