Skip to content

Upgrade devtools adapter to support Profiler#2246

Merged
marvinhagemeister merged 6 commits into
masterfrom
devtools-pkg
Jan 23, 2020
Merged

Upgrade devtools adapter to support Profiler#2246
marvinhagemeister merged 6 commits into
masterfrom
devtools-pkg

Conversation

@marvinhagemeister

@marvinhagemeister marvinhagemeister commented Jan 13, 2020

Copy link
Copy Markdown
Member

This PR replaces the current devtools adapter with the one that is dynamically injected by the extension. This leads to a stark size reduction of preact/debug 😉

Instead of just replacing the existing code in preact/debug, this PR adds a preact/devtool sub-package. The benefit of this is that it allows us to enable the devtools in production without bringing in the weight of preact/debug. The new devtools adapter weights just 140 B although that size will likely be smaller once bundled into the main package.

New features:

  • Attach devtools to production sites 🎉
  • Record profiling times of a Preact component tree 💯

Tasks:

  • Release new version of devtools and wait until it's approved before merging this PR. That way users have a smooth upgrade experience.
    • Firefox
    • Chrome

Screenshot from 2020-01-13 09-37-55

@coveralls

coveralls commented Jan 13, 2020

Copy link
Copy Markdown

Coverage Status

Coverage increased (+2.1%) to 99.805% when pulling 5243d01 on devtools-pkg into 6cc97cd on master.

Comment thread devtools/package.json Outdated

@JoviDeCroock JoviDeCroock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Marvin, do you mind removing the FLAKEY=false from our travisConfig?

@marvinhagemeister

marvinhagemeister commented Jan 18, 2020

Copy link
Copy Markdown
Member Author

@JoviDeCroock FLAKEY is used for some two tests unrelated to devtools and this PR.

  1. let it = DISABLE_FLAKEY ? xit : _it;
  2. if (DISABLE_FLAKEY !== true) {

I'm a bit hesitant to remove them with this PR, because they are unrelated to devtools.

@marvinhagemeister marvinhagemeister marked this pull request as ready for review January 18, 2020 05:50
@JoviDeCroock

Copy link
Copy Markdown
Member

@marvinhagemeister, those work without Flakey last time I checked. Let’s push one commit to make sauce run for this PR then we can see (or we do it in a new PR after this one)

@developit

Copy link
Copy Markdown
Member

IIRC FLAKEY is only used for cross-browser tests via Saucelabs. Those tests should be running in CI against Chrome already.

@marvinhagemeister marvinhagemeister merged commit ec5340f into master Jan 23, 2020
@marvinhagemeister marvinhagemeister deleted the devtools-pkg branch January 23, 2020 07:29
porfirioribeiro pushed a commit to porfirioribeiro/preact that referenced this pull request Feb 3, 2020
Upgrade devtools adapter to support Profiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants