Giter Site home page Giter Site logo

Comments (17)

antidis avatar antidis commented on May 18, 2024 1

I'll try do something like that tomorrow. I suspect you're on SF time, and I'm in Dublin, so it may be tricky to arrange remote debugging. @GavinJoyce maybe we can pair on this tomorrow afternoon?

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024 1

Merged the change, let me know if you're still having issues @antidis @GavinJoyce!

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

To be specific:

  • Scrolling to the end of the currently-loaded content takes place first.
  • I hit the end and nothing seems to happen. I can scroll back up fine—the browser has not locked.
  • Loading kicks in a short time later (the loading function in this case is just a task that throws a few hashes into the rows array, then notifies Ember of the change).

It's hard to get the timings precise as it's hard to map my inputs precisely to the timeline above, and the browser window with the above timeline has been lost. When I generated a profile a while ago, it appears to show a ton of time spent idling but not much else.

This behaviour vanishes when run.next is replaced with run.schedule('afterRender', ... here: 4290749#diff-dd82fd2ab5100320f9dd5248149349efR312 - but as Chris mentions, this isn't a fix.

I had hoped to get some more information to help my own digging into the situation—we're not quite at the stage where I have a twiddle to show the behaviour, but I'll try create on tomorrow.

We're on Ember 2.11.3.

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

Interesting. Yeah, it's weird that the browser is spending so much time doing nothing, run.next should just schedule a new runloop in a setTimeout which would generally run in between scrolls/RAFs. Not sure why it's being pushed out that much, but that's definitely way too much of a delay. @runspired any insights on this?

@antidis could you possibly paste the template usage and the actions that caused this so we can try to debug? Or if you could make an ember-twiddle or branch on the dummy app that demonstrates the issue that would be ideal

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

Working on the twiddle this morning. Will post then.

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

Here's a stripped-down and sanitised version of the addon we're hoping to include vertical-collection in:

https://github.com/antidis/vertical-collection-bug-demo

The problem still occurs, and occurs reliably. Interestingly, this problem does not occur in Firefox. A colleague suggested that this may indicate an RSVP bug.

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

The problem also does not occur in Safari. This may be hitting a Chrome bug.

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

Weird, I'm not able to reproduce locally:

apr-12-2017 11-59-15

There isn't really a noticeable gap between when the RAF ends and the scroll event fires. If the loading event were a longer running async task then there could be lag, definitely, but that's not really something we can control.

Maybe there's a hardware component to this as well?

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

I sure hope not.

This is on a mid 2015 Retina MBP. Chrome version: 57.0.2987.133 (64-bit). Happens in HiDPI and non-HiDPI resolutions too. We have other test hardware available, but so far we've only tested it on (likely 2015) MBPs.

What hardware are you running? If we find out, we can hopefully track it down.

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

I'm running El Capitan on a 2013 rMBP, Chrome Version 57.0.2987.133 (64-bit)

Any chance you could take a video of it in action? I'll try to reproduce locally but I can't really help until I do 😅

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

scrolling-problem

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

Ok yeah, super noticeable and nothing like what's happening on my machine. WEIRD.

Definitely a priority to get this fixed before 1.0.0, even if it's not an issue in this library directly.

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

@antidis could you possibly send a couple of timeline screenshots with these sections zoomed in?

aaba8000-1eea-11e7-998b-542c6650df99_copy

Would help to get a better look at what's going on at those points in time. Also, I'm up for remote debugging via Screenhero or something like that if you can do that.

from vertical-collection.

GavinJoyce avatar GavinJoyce commented on May 18, 2024

Maybe there's a hardware component to this as well?

Another data point, I can reproduce this issue on my machine in both Chrome 57.0.2987.133 (64-bit) and Chrome 59.0.3069.0 canary (64-bit) with no addons on MacBook Pro (Retina, 13-inch, Early 2015) running OSX 10.12.4 (16E195)

from vertical-collection.

runspired avatar runspired commented on May 18, 2024

Chrome aggressively throttles and can sometimes even drop setTimeout calls during scroll. This seems overly aggressively throttled though.

As I think about this, we may have to move to afterRender scheduling for the microtask semantics to avoid this.

One thing to note, with scroll, it is never guaranteed that you'll be given the chance to respond in a reasonable amount of time. Not unique to Chrome, but Chrome has always been more aggressive in this area.

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

Makes sense, we can move the scheduling to afterRender and add a note in the Perf section in the docs (which needs to be added). As long as actions are short and simple, or schedule things asynchronously themselves, it should be fine.

from vertical-collection.

antidis avatar antidis commented on May 18, 2024

@pzuraq Testing it locally, and the problem seems to have disappeared. Thanks!

from vertical-collection.

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.