Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spinner performance. Use translate instead of positioning. #8842

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

rashidkpc
Copy link
Contributor

This changes the pink spinner bar at the top from using background positioning of the element to use CSS transforms, thus offloading the spinner animation to the GPU and removing the need to render & paint. There's no functionality change here, this is just a performance tweak.

While the pies below make the gain seem minimal, this change takes my CPU from a steady 30% while the spinner is active, down to 17%. Its a pretty big win when you have a breakpoint set and the spinner is running.

Before:
screen shot 2016-10-26 at 4 23 52 pm

After:
screen shot 2016-10-26 at 4 19 54 pm

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

LGTM

@rashidkpc rashidkpc merged commit d40b6be into elastic:master Oct 27, 2016
@ppisljar
Copy link
Member

ppisljar commented Dec 2, 2016

@rashidkpc this has 5.1.0 label but was not backported to 5.1 (or 5.x)

@rashidkpc
Copy link
Contributor Author

rashidkpc commented Dec 2, 2016

@ppisljar it is, the commit hash is different

25bf768#diff-f1bf9e3f7c9d2e03e0c2bda30d6bb776

@epixa epixa added v5.1.1 and removed v5.1.0 labels Dec 8, 2016
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.

4 participants