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

Improve properties panel resize performance #1091

Merged
merged 4 commits into from
Jan 11, 2019

Conversation

barmac
Copy link
Collaborator

@barmac barmac commented Jan 9, 2019

This PR improves performance of log and properties panel resizing behaviour. It was achieved by following changes:

  1. Dragger factory is simplified and it's used only in constructor (before: for each render).
  2. The resize handler is now throttled (100 ops/s) so that we do not try to handle each of hundreds of drag events per second.

Closes #1081

@ghost ghost assigned barmac Jan 9, 2019
@ghost ghost added the needs review Review pending label Jan 9, 2019
@barmac barmac changed the title WIP 1081 improve properties panel resize performance 1081 improve properties panel resize performance Jan 9, 2019
@barmac barmac requested a review from nikku January 9, 2019 13:03
@barmac barmac changed the title 1081 improve properties panel resize performance WIP 1081 improve properties panel resize performance Jan 9, 2019
@barmac barmac force-pushed the 1081-improve-properties-panel-resize-performance branch 3 times, most recently from 5c35130 to 42f22e6 Compare January 9, 2019 14:45
@barmac barmac changed the title WIP 1081 improve properties panel resize performance Improve properties panel resize performance Jan 9, 2019
@barmac barmac force-pushed the 1081-improve-properties-panel-resize-performance branch from 42f22e6 to 18bce7e Compare January 10, 2019 15:07
* remove not used extraArgs feature
* use event listener `once` option to remove dragend listener
@barmac barmac force-pushed the 1081-improve-properties-panel-resize-performance branch 2 times, most recently from 94bc901 to bca86c1 Compare January 10, 2019 15:31
@barmac
Copy link
Collaborator Author

barmac commented Jan 10, 2019

Notes:

  • excessive listeners in chrome dev tools may be produced by React in development mode (Simple app causing a memory leak? facebook/create-react-app#4037)
  • it might be worth it to implement shouldComponentUpdate in our core components
    It helped with TabLinks and probably there might be still something to do regarding performance.

Useful links:

@barmac barmac force-pushed the 1081-improve-properties-panel-resize-performance branch from bca86c1 to bfd3652 Compare January 10, 2019 15:52
This commit causes drag events to be throttled. Also, log and properties
panel will now create dragger only when actual drag is started.

Closes #1081
@nikku nikku force-pushed the 1081-improve-properties-panel-resize-performance branch from bfd3652 to 436e069 Compare January 11, 2019 08:05
@ghost ghost assigned nikku Jan 11, 2019
@nikku
Copy link
Member

nikku commented Jan 11, 2019

Simplifying the dragger util unfortunately removed optimizations that prevented drag jumping on Linux and Windows (6509127#diff-235b8f651e56a3bded8b48bd8c5e2068L46).

Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

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

Approving regardless from resize quirk.

@merge-me merge-me bot merged commit 600ef2a into next Jan 11, 2019
@delete-merged-branch delete-merged-branch bot deleted the 1081-improve-properties-panel-resize-performance branch January 11, 2019 08:33
@ghost ghost removed the needs review Review pending label Jan 11, 2019
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.

2 participants