Skip to content

Add support for componentDidCatch Component method#886

Closed
adamsilverstein wants to merge 18 commits into
preactjs:masterfrom
adamsilverstein:819
Closed

Add support for componentDidCatch Component method#886
adamsilverstein wants to merge 18 commits into
preactjs:masterfrom
adamsilverstein:819

Conversation

@adamsilverstein

Copy link
Copy Markdown

Amends #819 removing these changes - tests still pass.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling b616cc8 on adamsilverstein:819 into f7834ec on developit:master.

@coveralls

coveralls commented Sep 20, 2017

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 6f6eeeb on adamsilverstein:819 into eeec8d6 on developit:master.

@developit

Copy link
Copy Markdown
Member

Do we know what the size hit is here?

@awinogradov

Copy link
Copy Markdown

Really want it right now! Can't wait!)

Giffy

@awinogradov

Copy link
Copy Markdown

@adamsilverstein @developit do you need help here maybe? Any timings for merge?)

@ForsakenHarmony

Copy link
Copy Markdown
Member

Size comparison, possibly perf impact

@developit

developit commented Mar 7, 2018

Copy link
Copy Markdown
Member

Looks like the size impact is an added 107 bytes. For the utility, I think we can call that justifiable.

Still need to run perf tests against this, hopefully the try blocks don't cause deopts.

To-Do: (help wanted for any of these!)

  • Resolve TS merge conflicts
  • Run local perf tests against master
  • Run against Preact 8.2.7 on js-framework-benchmark

@developit developit added this to the 9.0 milestone Mar 7, 2018
@marvinhagemeister

Copy link
Copy Markdown
Member

Fixed the TS conflicts 👍

@awinogradov

Copy link
Copy Markdown

@marvinhagemeister looks like not ;)

@marvinhagemeister

Copy link
Copy Markdown
Member

@awinogradov I did, but we merged other PRs that changed some things in preact.d.ts ;)

@andrewiggins

andrewiggins commented Mar 18, 2018

Copy link
Copy Markdown
Member

I've setup the ability to run and compare a custom build of preact in my js-frameworks-benchmark fork in the preact-componentDidCatch-keyed branch. Instructions to set it up are in the Readme of that branch.

Below are the results from running the tests with --count 3 on my laptop. However, my laptop is a work laptop I have to run these tests in a virtual machine so it may not be the best for consistent perf testing.

The startup and memory allocations were basically the same.

Duration in milliseconds ± standard deviation (Slowdown = Duration / Fastest)

Namepreact-v8.2.7-keyedpreact-componentDidCatch-keyed
create rows
Duration for creating 1000 rows after the page loaded.
241.0±53.9
(1.0)
265.7±53.9
(1.1)
replace all rows
Duration for updating all 1000 rows of the table (with 5 warmup iterations).
176.0±7.8
(1.0)
204.3±30.7
(1.2)
partial update
Time to update the text of every 10th row (with 5 warmup iterations) for a table with 10k rows.
154.0±37.2
(1.2)
132.3±9.7
(1.0)
select row
Duration to highlight a row in response to a click on the row. (with 5 warmup iterations).
5.3±1.9
(1.0)
11.3±4.9
(1.0)
swap rows
Time to swap 2 rows on a 1K table. (with 5 warmup iterations).
22.7±9.5
(1.0)
26.3±3.9
(1.2)
remove row
Duration to remove a row. (with 5 warmup iterations).
58.3±3.3
(1.0)
63.7±8.6
(1.1)
create many rows
Duration to create 10,000 rows
2,153.0±26.8
(1.0)
2,711.0±678.7
(1.3)
append rows to large table
Duration for adding 1000 rows on a table of 10,000 rows.
352.3±51.0
(1.0)
386.7±33.1
(1.1)
clear rows
Duration to clear the table filled with 10.000 rows.
299.7±23.2
(1.0)
309.0±36.5
(1.0)
slowdown geometric mean1.021.10

EDIT: grammar

@andrewiggins

Copy link
Copy Markdown
Member

Here are some perf run results on a more reliable and powerful machine with sligtly more consistent standard deviations: https://gist.github.com/andrewiggins/19c2a1932a2540d343076434919c541b

@awinogradov

Copy link
Copy Markdown

So, @developit are we ready? ;)

@awinogradov

Copy link
Copy Markdown

Guys?) Any progress here?

@ForsakenHarmony

ForsakenHarmony commented Mar 21, 2018

Copy link
Copy Markdown
Member

We'll probably get a release with all the recent ts fixes out and then merge this

@awinogradov

Copy link
Copy Markdown

Still waiting...

@hassanbazzi

Copy link
Copy Markdown
Member

I will check up on this with the team today. Sorry y'all. There are some conflicts though with the most recent fixes that went in.

@adamsilverstein

Copy link
Copy Markdown
Author

Closing in favor of #819 now that activity has resumed there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants