Commit Graph

12 Commits

Author SHA1 Message Date
Dan Abramov 55f18f20ea Update Fiber debugger deps 2017-02-22 17:20:53 +00:00
Sebastian Markbåge 5659bd2a63 Polyfill requestIdleCallback when native is not available (#8833)
I introduce the ReactDOMFrameScheduling module which just exposes
rIC and rAF.

The polyfill works by scheduling a requestAnimationFrame, store the time
for the start of the frame, then schedule a postMessage which gets
scheduled after paint. The deadline is set to time + frame rate.
By separating the idle call into a separate event tick we ensure that
layout, paint and other browser work is counted against the available time.

The frame rate is dynamically adjusted by tracking the minimum time between
two rAF callbacks. This is not perfect because browsers can schedule
multiple callbacks to catch up after a long frame. To compensate for this
we only adjust if two consecutive periods are faster than normal.

This seems to guarantee that we will hit frame deadlines and we don't end
up dropping frames. However, there is still some lost time so we risk
starving by not having enough idle time.

Especially Firefox seems to have issues keeping up on the triangle demo
However, that is also true for native rIC in Firefox. It seems like more
render work is scheduled on the main thread pipeline and also that JS
execution just generally has more overhead.
2017-01-21 10:27:46 -08:00
Toru Kobayashi 0758bb0035 Fix to work fiber debugger with npm start (#8811)
* FiberDebugger uses packages built in local

* Fix key warnings in FiberDebugger

* Remove react packages from package.json and yarn.lock for using pacakges built in local

* Remove fiber.js from `files` in package.json
2017-01-17 05:34:02 -08:00
Dan Abramov 5afd8cd704 Improve Fiber debugger (#8767)
* Simplify the hooks
* Capture completion at the right moment
* Animate the scroll with the fiber on the stack
* Better display priorities
2017-01-13 04:41:56 -08:00
Dan Abramov fd1ef53711 [Fiber Debugger] Bring up to date (#8765)
* Ignore orphaned fibers in the debugger

* Remember last entered code via localStorage

* Update Create React App

* Minor fixes

* Dogfood Fiber
2017-01-12 11:55:59 -08:00
Whien 3b005a7e75
fiber example typo 2017-01-03 13:52:48 +08:00
Andrew Clark d7f89b8681 Don't rely on commit phase effect to clear updates
Instead clear updates on the work-in-progress during the begin phase.
Aborted updates are recovered by cloning from the current fiber.
2016-12-15 09:12:12 -08:00
Andrew Clark ead8ab7e2d Add unstable_deferredUpdates
This is needed to get the triangle demo working.
2016-12-15 09:12:12 -08:00
Daniela Borges 5545d43bc4 remove output field from debugger (#8440) 2016-11-28 18:19:49 +00:00
Dan Abramov 225325eada Add Fiber Debugger (#8033)
* Build react-noop as a package

This lets us consume it from the debugger.

* Add instrumentation to Fiber

* Check in Fiber Debugger
2016-10-25 08:36:37 +01:00
Sebastian Markbåge f7e0db9a18 Build React DOM Fiber package (#7173)
This builds a `react-dom-fiber.js` bundle which exposes ReactDOMFiber.
This allows early experiments with the new Fiber reconciler.

I also expose it in the npm package through `react-dom/fiber`.
2016-08-10 18:45:14 -07:00
Sebastian Markbage 05c6925282 Rudimentary DOM Renderer with Example 2016-06-30 14:30:16 -07:00