Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

PERF: Only transform functional styles #74

Merged
merged 2 commits into from
Jan 4, 2016
Merged

Conversation

exogen
Copy link
Contributor

@exogen exogen commented Dec 31, 2015

While investigating FormidableLabs/victory#141, I did some profiling and found that evaluateStyles was the most time-consuming function in the provided demo. It's currently transforming styles even if it would be a no-op.

This change only transforms style objects that contain functional styles. This increased FPS by ~30% for me. The most time consuming functions are now all in Radium, as I expected from previous tests. We'll need to focus our efforts optimizing Radium (or using it more cautiously) if we'd like to make Victory much faster.

/cc @boygirl @bclinkinbeard

While testing victory#141, I did some profiling and found that
`evaluateStyles` was the most time-consuming function. It's currently
transforming styles even if it would be a no-op.

This only transforms style objects that contain functional styles. This
increased FPS by ~30% for me. The most time consuming functions are now
all from Radium, as I expected. We'll need to focus our efforts
optimizing Radium (or avoiding it) if we'd like to make Victory much
faster.

/cc @boygirl @bclinkinbeard
@exogen
Copy link
Contributor Author

exogen commented Dec 31, 2015

CI failure appears unrelated, anyone know what's up?

@boygirl
Copy link
Contributor

boygirl commented Dec 31, 2015

31 12 2015 00:14:24.425:ERROR [karma]: [RangeError: Wrong length!]
RangeError: Wrong length!
    at RangeError (native)
    at strictToLength (/home/travis/build/FormidableLabs/victory-bar/node_modules/karma/node_modules/core-js/modules/_typed-array.js:94:36)
...

That's a new one...

@exogen
Copy link
Contributor Author

exogen commented Dec 31, 2015

Waiting for an upstream bug to be fixed: karma-runner/karma#1768

We could downgrade Karma, but if we sit on this for a short while it'll most likely get fixed. Thanks to @coopy for pointing out.

@boygirl
Copy link
Contributor

boygirl commented Jan 4, 2016

Spurious Karma bug resolved! Approved!

exogen added a commit that referenced this pull request Jan 4, 2016
PERF: Only transform functional styles
@exogen exogen merged commit 2666c46 into master Jan 4, 2016
@exogen exogen deleted the perf-evaluateStyle branch January 4, 2016 22:06
@exogen
Copy link
Contributor Author

exogen commented Jan 4, 2016

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants