Giter VIP home page Giter VIP logo

Comments (8)

sccolbert avatar sccolbert commented on August 23, 2024

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.

sccolbert avatar sccolbert commented on August 23, 2024

Also, the chrome profiling dev tools can help you pin down the costs during resize with nice flame charts.

from phosphor.

mrocklin avatar mrocklin commented on August 23, 2024

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.

sccolbert avatar sccolbert commented on August 23, 2024

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.

capture

from phosphor.

sccolbert avatar sccolbert commented on August 23, 2024

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.

mrocklin avatar mrocklin commented on August 23, 2024

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.

sccolbert avatar sccolbert commented on August 23, 2024

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.

mrocklin avatar mrocklin commented on August 23, 2024

Way ahead of you: jupyterlab/jupyterlab#958 :)

from phosphor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.