Giter VIP home page Giter VIP logo

Comments (4)

DanTup avatar DanTup commented on August 24, 2024

We used to do this, but when I changed it reuse the rows I removed it since I figured:

  1. We're populating the data on the next frame (via RAF) and inserted directly into the visible space, so I figured it was "always visible and up to date" (on my MacBook I can't repro any scrolling issues, or any white space)
  2. Rendering another screen above below essentially means 3x as many rows to re-render on every update (at least the way it works now - potentially we could make it re-order them moving from the start to the end, but that's not what it does currently) which seemed like it might make scrolling worse not better

Can you cause issues/stutters/white space when you scroll? Anything specific you're doing (how big is the log, how are you scrolling, etc.?)

from devtools.

devoncarew avatar devoncarew commented on August 24, 2024

I think there's always going to be a frame or two of latency - unrendered, white rows - as we're populating via javascript, and scrolling dom is likely highly optimized in the browser.

I do see what looks like some slight tearing at the top and bottom when I scroll quickly. Some over-rendering above and below would likely take the edge off that? If not a full page above and below, 1/2 page?

Rendering another screen above below essentially means 3x as many rows to re-render on every update (at least the way it works now - potentially we could make it re-order them moving from the start to the end, but that's not what it does currently) which seemed like it might make scrolling worse not better

I think if we did increase the over-rendering, we'd want to try and re-cycle rows that had already been rendered - i.e., just remove a few rows off the top of the table and add a few on the bottom, and not touch ones that were already present.

The tearing on scroll really isn't bad, but we may want to revisit this later to get slightly smoother scrolling.

from devtools.

jacob314 avatar jacob314 commented on August 24, 2024

I noticed the whitespace today playing around with the tool. Good news is there is an easy fix. The scroll event is sync but using RAF causes us to always miss a frame. There are some clever chrome apis if we cared about 60fps but for us I think all that matters is to general avoid flickering and hit at least 20FPS. Note there were a couple years where scroll was async in chrome which was really annoying for framework authors trying to infinite scroll.
https://blog.chromium.org/2016/05/new-apis-to-help-developers-improve.html

from devtools.

kenzieschmoll avatar kenzieschmoll commented on August 24, 2024

The table scrolling looks pretty smooth with the latest DevTools. I'm going to close this issue, as it appears fixed. We can re-open if this is still an issue.

from devtools.

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.