Comments (8)
It really depends on the contents in the panels. The act of resizing the panels themselves is < 1ms
on my machine. If you are reflowing lots of stuff within the panels, the cost can add up.
Try running this example and seeing how it affects your CPU usage. It's negligible on my machine.
from phosphor.
Also, the chrome profiling dev tools can help you pin down the costs during resize with nice flame charts.
from phosphor.
I'm totally out of my element here when it comes to browser performance, but one thought would be to throttle resize events to occur no more often than every 20ms or something.
from phosphor.
Here's a snapshot of the timeline during panel resizing on my machine. You can see that a vast majority of the time is spent idle, and only a very small part is spent in scripting.
from phosphor.
Splitter resizes are already throttled on animation frames (which let's the browser pick the optimal refresh). My hunch here is that you have content in your panels which takes a long time for the browser to relayout due to the resize. What are you displaying in your panels?
from phosphor.
It first arose when when dealing with Bokeh plots (which would make sense as expensive) but I can reproduce with a notebook and a terminal
from phosphor.
This is almost certainly inline reflows due to resizing the notebook, and not an inherent performance problem with Phosphor. Can you please open an issue on JLab so we can track it down there?
from phosphor.
Way ahead of you: jupyterlab/jupyterlab#958 :)
from phosphor.
Related Issues (20)
- Datagrid: Asynchronous TextRenderer functions HOT 6
- Datastore load testing HOT 2
- distributing as es6 HOT 2
- [Docs/Examples] Codesandbox template / Storybook support HOT 6
- [Question] Hot reloading phosphor widgets? HOT 4
- Applying zoom to parent of some phosphor widgets breaks mouse targeting HOT 5
- Enable setting context menu icon HOT 2
- Deprecated user-defined Event API HOT 2
- [Question] There may be invalid code in reallocSizers function HOT 1
- Save layouts to local file and restore them HOT 1
- Is there a list of projects which make use of phosphor that one could check out? HOT 2
- Add a "pass thru" virtualdom element that accepts a custom rendering callback HOT 1
- Mac-only keyboard shortcut HOT 10
- Datagrid: investigate using CanvasKit
- Some FocusTracker and TabBar unittests fail in master on OS X with latest Firefox HOT 1
- Stretch factors and size basis should be initialized when sizer is created.
- Make Phosphor safe to load on the page more than once HOT 4
- Tokens that extend other tokens HOT 5
- GridLayout.removeWidget bug HOT 2
- GridLayout tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phosphor.