1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #8741 resolved

Pause when clicking anywhere on Pull Request page (BB-9862)

James Jensen
created an issue

When viewing the diffs in a large pull request, anytime I click anywhere in the screen there is a significant pause, even for operations that don't require any network activity. I've noticed this in particular in Chrome. (The pause on one Pull Request I'm trying in IE11 is probably about a second, whereas it's 3-4 seconds in Chrome.)

Example: Open a large pull request in Chrome. Scroll with the mouse roller down a ways to see that scrolling works fine. Now click in the background and try scrolling immediately. You are unable to scroll for a few seconds.

Comments (8)

  1. James Jensen reporter

    Thanks for your response. I was frankly surprised that nobody else seems to have reported it (although I have seen a few "pull requests are slow" issues that may be related.

    By the way, I don't know if this will help, but based on my web programming experience I have a suspicion that this page is subscribing a large number of "live" handlers on the page, so the javascript has to walk through thousands of handlers every time a click happens. It's likely that you could fix this issue if you simply restructure the way that your event handlers get registered.

    But without seeing the source code, who knows?

  2. Zachary Davis staff

    Hi James,

    Just wanted to drop a note saying I looked into this a bit, and it does not seem to be caused by live handlers (or, surprisingly, javascript at all). In my testing, the pause appears to be caused by Chrome recalculating styles on the page (I'm unclear as to why a click triggers this, but oh well). So unfortunately I think it's some not-so-easily-fixed combination of css inefficiency and the browsers' inability to handle large doms very well (Firefox, for instance, shows no such pause). We're continually working on improving the efficiency of our css as well as our overall performance, but I'm not sure this problem has an easy fix.

  3. Zachary Davis staff

    Hi James,

    We put out a fix yesterday that appears to solve this problem. Turns out this line in our (outdated) version of jQuery UI:

    .ui-widget:active { outline: none; }
    

    was causing Chrome to spend an inordinate amount of time recalculating the styles on click. Let me know if you still see problems in Chrome.

    Cheers, Zach

  4. Log in to comment