Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

en.m.wikipedia.org - Expanding sections takes a long time #24923

Closed
webcompat-bot opened this issue Jan 26, 2019 · 15 comments
Closed

en.m.wikipedia.org - Expanding sections takes a long time #24923

webcompat-bot opened this issue Jan 26, 2019 · 15 comments
Labels
browser-firefox-mobile priority-critical severity-important A non-core broken piece of functionality, not behaving the way you would expect. type-bad-performance When sites are unresponsive, slow transition type-js Generic JS issues
Milestone

Comments

@webcompat-bot
Copy link

URL: https://en.m.wikipedia.org/wiki/2019_Australian_Open

Browser / Version: Firefox Mobile 66.0
Operating System: Android 7.1.1
Tested Another Browser: No

Problem type: Something else
Description: Performance on page is extremely slow, taking multiple seconds to expand a section.
Steps to Reproduce:
Scrolling the page, rendering takes many seconds to catch up, and tapping on a section it takes seconds to expand.
Screenshot Description

Browser Configuration
  • mixed active content blocked: false
  • image.mem.shared: true
  • buildID: 20190121125354
  • tracking content blocked: false
  • gfx.webrender.blob-images: true
  • hasTouchScreen: true
  • mixed passive content blocked: false
  • gfx.webrender.enabled: false
  • gfx.webrender.all: false
  • channel: nightly

Console Messages:

[u'[console.log(JQMIGRATE: Migrate is installed with logging active, version 3.0.1) https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CkvStoreMaintenance%2ClegacySupport%2CstartUp%7Cext.centralauth.centralautologin%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.eventLogging.subscriber%7Cext.quicksurveys.init%2Clib%7Cext.relatedArticles.readMore.bootstrap%2Cgateway%7Cext.visualEditor.targetLoader%2Ctrack%2Cve%7Cjquery%2Coojs%2Coojs-router%7Cjquery.accessKeyLabel%2Cclient%2Ccookie%2CtextSelection%2Cthrottle-debounce%7Cmediawiki.RegExp%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cnotify%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.legacy.wikibits%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.startup%7Cmediawiki.template.hogan%2Cregexp%7Cmobile.editor%2Cinit%2Csite%2Cstartup%7Cmobile.messageBox.styles%7Cmobile.pagelist.styles%7Cmobile.pagesummary.styles%7Cmobile.site.styles%7Cmobile.startup.images%7Cmobile.startup.images.variants%7Cschema.QuickSurveyInitiation%7Cskins.minerva.icons.images.scripts%2Cvariants%7Cskins.minerva.icons.images.scripts.misc%7Cskins.minerva.icons.page.issues.default.color%7Cskins.minerva.icons.page.issues.medium.color%7Cskins.minerva.icons.page.issues.uncolored%7Cskins.minerva.mainMenu%2Coptions%2Cscripts%2Ctoggling%2Cwatchstar%7Cskins.minerva.mainMenu.icons%2Cstyles%7Cskins.minerva.options.share.icon%7Cskins.minerva.scripts.top%7Cuser.defaults&skin=minerva&version=0sn6aky:218:149]', u'[console.warn(This page is using the deprecated ResourceLoader module "schema.QuickSurveyInitiation".\nSee https://phabricator.wikimedia.org/T205744 for migration info.) https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CkvStoreMaintenance%2ClegacySupport%2CstartUp%7Cext.centralauth.centralautologin%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.eventLogging.subscriber%7Cext.quicksurveys.init%2Clib%7Cext.relatedArticles.readMore.bootstrap%2Cgateway%7Cext.visualEditor.targetLoader%2Ctrack%2Cve%7Cjquery%2Coojs%2Coojs-router%7Cjquery.accessKeyLabel%2Cclient%2Ccookie%2CtextSelection%2Cthrottle-debounce%7Cmediawiki.RegExp%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cnotify%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.legacy.wikibits%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.startup%7Cmediawiki.template.hogan%2Cregexp%7Cmobile.editor%2Cinit%2Csite%2Cstartup%7Cmobile.messageBox.styles%7Cmobile.pagelist.styles%7Cmobile.pagesummary.styles%7Cmobile.site.styles%7Cmobile.startup.images%7Cmobile.startup.images.variants%7Cschema.QuickSurveyInitiation%7Cskins.minerva.icons.images.scripts%2Cvariants%7Cskins.minerva.icons.images.scripts.misc%7Cskins.minerva.icons.page.issues.default.color%7Cskins.minerva.icons.page.issues.medium.color%7Cskins.minerva.icons.page.issues.uncolored%7Cskins.minerva.mainMenu%2Coptions%2Cscripts%2Ctoggling%2Cwatchstar%7Cskins.minerva.mainMenu.icons%2Cstyles%7Cskins.minerva.options.share.icon%7Cskins.minerva.scripts.top%7Cuser.defaults&skin=minerva&version=0sn6aky:447:98]', u'[console.warn(Use of "events" is deprecated. Setting `events` on the View is deprecated. Please use options.) https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=minerva&target=mobile:4:589]', u"[console.log(Hello friend! \n\nWikipedia is powered by MediaWiki. MediaWiki is open source software and we're always keen to hear from fellow developers about what you love ( ) or what we could be doing better ( ).\n\n Come chat with us on irc @ https://webchat.freenode.net/?channels=#wikimedia-mobile\n\n Or work for us @ https://wikimediafoundation.org/about/jobs/) https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CkvStoreMaintenance%2ClegacySupport%2CstartUp%7Cext.centralauth.centralautologin%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.eventLogging.subscriber%7Cext.quicksurveys.init%2Clib%7Cext.relatedArticles.readMore.bootstrap%2Cgateway%7Cext.visualEditor.targetLoader%2Ctrack%2Cve%7Cjquery%2Coojs%2Coojs-router%7Cjquery.accessKeyLabel%2Cclient%2Ccookie%2CtextSelection%2Cthrottle-debounce%7Cmediawiki.RegExp%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cnotify%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.legacy.wikibits%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.startup%7Cmediawiki.template.hogan%2Cregexp%7Cmobile.editor%2Cinit%2Csite%2Cstartup%7Cmobile.messageBox.styles%7Cmobile.pagelist.styles%7Cmobile.pagesummary.styles%7Cmobile.site.styles%7Cmobile.startup.images%7Cmobile.startup.images.variants%7Cschema.QuickSurveyInitiation%7Cskins.minerva.icons.images.scripts%2Cvariants%7Cskins.minerva.icons.images.scripts.misc%7Cskins.minerva.icons.page.issues.default.color%7Cskins.minerva.icons.page.issues.medium.color%7Cskins.minerva.icons.page.issues.uncolored%7Cskins.minerva.mainMenu%2Coptions%2Cscripts%2Ctoggling%2Cwatchstar%7Cskins.minerva.mainMenu.icons%2Cstyles%7Cskins.minerva.options.share.icon%7Cskins.minerva.scripts.top%7Cuser.defaults&skin=minerva&version=0sn6aky:358:380]", u'[console.warn(Use of "events" is deprecated. Setting `events` on the View is deprecated. Please use options.) https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=minerva&target=mobile:4:589]', u'[console.warn(Use of "events" is deprecated. Setting `events` on the View is deprecated. Please use options.) https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=minerva&target=mobile:4:589]']

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added this to the needstriage milestone Jan 26, 2019
@softvision-sergiulogigan softvision-sergiulogigan added the severity-important A non-core broken piece of functionality, not behaving the way you would expect. label Feb 7, 2019
@softvision-sergiulogigan softvision-sergiulogigan changed the title en.m.wikipedia.org - see bug description en.m.wikipedia.org - Expanding sections takes a long time Feb 7, 2019
@softvision-sergiulogigan

I can reproduce this issue.
There's a significant time difference between tapping and expanding any section.
On Chrome, the expansion is almost instantaneous.

screen capture

Tested with:
Browser / Version: Firefox Nightly 67.0a1 (2019-02-07)
Operating System: LG G5 (Android 7.0) - 1440 x 2560 pixels (~554 ppi pixel density)

@karlcow karlcow self-assigned this Feb 20, 2019
@karlcow
Copy link
Member

karlcow commented Feb 20, 2019

to note that this not happening on all pages. It seems to happen on pages which contains complex content in the sub-section (images, tables, etc.)

A section has this markup.

<h2
  class="in-block section-heading collapsible-heading"
  tabindex="0"
  aria-haspopup="true"
  aria-controls="content-collapsible-block-0"
>
  <div
    class="mw-ui-icon mw-ui-icon-mf-arrow mw-ui-icon-element   indicator"
    title=""
  ></div>
  <span class="mw-headline" id="Tournament">Tournament</span
  ><span class="mw-editsection"
    ><a
      href="/w/index.php?title=2019_Australian_Open&amp;action=edit&amp;section=1"
      title="Edit section: Tournament"
      data-section="1"
      class="mw-ui-icon mw-ui-icon-element mw-ui-icon-minerva-edit-enabled edit-page"
      >Edit</a
    ></span
  >
</h2>

<div
  class="mf-section-1 collapsible-block"
  id="content-collapsible-block-0"
  aria-pressed="false"
  aria-expanded="false"
>
  <!-- cut the content -->
</div>

and

              (c.prototype._enable = function(e, t, s, a) {
                var c,
                  l,
                  h,
                  m,
                  d,
                  f = this,
                  b = mw.config.get("wgMFCollapseSectionsByDefault");
                function g() {
                  var t = window.location.hash;
                  0 === t.indexOf("#") && f.reveal(t, e);
                }
                (c =
                  e
                    .find("> h1,> h2,> h3,> h4,> h5,> h6,.section-heading")
                    .eq(0)
                    .prop("tagName") || "H1"),
                  void 0 === b && (b = !0),
                  (l = !b || "true" === mw.storage.get("expandSections")),
                  e.children(c).each(function(n) {
                    var c,
                      u = e.find(this),
                      p = u.find(".indicator"),
                      d = t + "collapsible-block-" + n;
                    u.next().is("div") &&
                      ((m = u.next("div")),
                      (c = Boolean(m.attr("data-is-reference-section"))),
                      u
                        .addClass("collapsible-heading ")
                        .data("section-number", n)
                        .data("page", s)
                        .attr({
                          tabindex: 0,
                          "aria-haspopup": "true",
                          "aria-controls": d
                        })
                        .on("click", function(e) {
                          e.target.href || (e.preventDefault(), f.toggle(u));
                        }),
                      (o.rotation = l ? 180 : 0),
                      (h = new i(o)),
                      p.length ? p.replaceWith(h.$el) : h.prependTo(u),
                      u.data("indicator", h.$el),
                      m
                        .addClass("collapsible-block")
                        .eq(0)
                        .attr({
                          id: d,
                          "aria-pressed": "false",
                          "aria-expanded": "false"
                        }),
                      (function(e, t) {
                        t.on("keypress", function(s) {
                          (13 !== s.which && 32 !== s.which) || e.toggle(t);
                        })
                          .find("a")
                          .on("keypress mouseup", function(e) {
                            e.stopPropagation();
                          });
                      })(f, u),
                      !c && ((!a && r.isWideScreen()) || l) && f.toggle(u));
                  }),
                  (function() {
                    var t = mw.config.get("wgInternalRedirectTargetUrl"),
                      s = !!t && t.split("#")[1];
                    s && ((window.location.hash = s), f.reveal(s, e));
                  })(),
                  g(),
                  (d = e.find("a:not(.reference a)")).on("click", function() {
                    void 0 !== d.attr("href") &&
                      d.attr("href").indexOf("#") > -1 &&
                      g();
                  }),
                  n.getWindow().on("hashchange", function() {
                    g();
                  }),
                  !r.isWideScreen() && s && (u(this, e, s), p(s));
              }),

@karlcow
Copy link
Member

karlcow commented Feb 20, 2019

f.toggle(u) is defined by

            (c.prototype.toggle = function(e) {
              var t,
                s = e.is(".open-block"),
                n = e.data("page"),
                a = e.next();
              e.toggleClass("open-block"),
                e.data("indicator").remove(),
                (o.rotation = s ? 0 : 180),
                (t = new i(o).prependTo(e)),
                e.data("indicator", t),
                a
                  .toggleClass("open-block")
                  .attr({ "aria-pressed": !s, "aria-expanded": !s }),
                this.eventBus.emit("section-toggled", {
                  expanded: s,
                  page: n,
                  isReferenceSection: Boolean(
                    a.attr("data-is-reference-section")
                  ),
                  $heading: e
                }),
                r.isWideScreen() ||
                  (function(e, t) {
                    var s = e.find("span").attr("id"),
                      r = e.hasClass("open-block"),
                      n = l(t);
                    s &&
                      (r
                        ? (n[t.title][s] = new Date().getTime())
                        : delete n[t.title][s],
                      h(n));
                  })(e, n);
            }),
              (c.prototype.reveal = function(e, t) {
                var s, r;
                try {
                  (r = (s = t.find(a(e))).parents(".collapsible-heading"))
                    .length ||
                    (r = s
                      .parents(".collapsible-block")
                      .prev(".collapsible-heading")),
                    r.length && !r.hasClass("open-block") && this.toggle(r),
                    r.length && window.scrollTo(0, s.offset().top);
                } catch (e) {}
              }),

@karlcow
Copy link
Member

karlcow commented Feb 20, 2019

with Firefox Desktop and RDM and Firefox Android UA.
Recording a profile of opening and closing the menu tournament, which contains a picture.
https://perfht.ml/2EjFvcX

and here a focus on opening
https://perfht.ml/2EiQkfn
We can see a lag in between the event and the final action.

@emilio performance issue?

@karlcow karlcow added the type-js Generic JS issues label Feb 20, 2019
@emilio
Copy link

emilio commented Feb 20, 2019

I don't see anything in those profiles that indicate that the process is busy, what makes you think that?

Seems like it's mostly the compositor waiting for screenshots, cc @mstange.

@karlcow
Copy link
Member

karlcow commented Feb 20, 2019

When we tap on the menu, it takes a long time for the section to expand and appears (with or without the performance tools working).

@emilio
Copy link

emilio commented Feb 20, 2019

Well, sure, I'm just saying that there's nothing obvious in those profiles... I also cannot reproduce this on my phone, which is really weird...

@karlcow
Copy link
Member

karlcow commented Feb 20, 2019

I also cannot reproduce this on my phone, which is really weird...

ah no this is good to have this difference.
I tested with latest nightly on pixel 2. Android 9.

@emilio
Copy link

emilio commented Feb 20, 2019

Mine is a OnePlus 6 with Android 9 as well.

@mstange
Copy link

mstange commented Feb 20, 2019

I don't see anything in those profiles that indicate that the process is busy, what makes you think that?

You can see the activity in the "Web Content (2/2)" thread which is hidden by default: https://perfht.ml/2XgMZVt

Seems like it's mostly the compositor waiting for screenshots, cc @mstange.

Yeah, the screenshot capturing code has problems :-/

On my Moto G5, expanding the subsections on the Australian Open article takes almost 3 seconds...

@karlcow
Copy link
Member

karlcow commented Feb 21, 2019

@mstange Thanks! In which product/componentof Mozilla bugzilla should we file a bug?

@emilio
Copy link

emilio commented Feb 21, 2019

You can see the activity in the "Web Content (2/2)" thread which is hidden by default: https://perfht.ml/2XgMZVt

Oh, I see. I actually see what's happening there. I'm not quite sure why I cannot repro locally, but they are calling getComputedStyle a bunch in display: none subtrees... I'd say this is a dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=1381071.

@karlcow
Copy link
Member

karlcow commented Feb 21, 2019

Thanks @emilio. Let's make it a dup, and we can still come back to it if we find that was not the case.

@karlcow
Copy link
Member

karlcow commented Feb 21, 2019

Close as duplicate of #1381071 (Mozilla)

@lock
Copy link

lock bot commented Feb 28, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue at https://webcompat.com/issues/new if you are experiencing a similar problem.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 28, 2019
@karlcow karlcow added the type-bad-performance When sites are unresponsive, slow transition label Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser-firefox-mobile priority-critical severity-important A non-core broken piece of functionality, not behaving the way you would expect. type-bad-performance When sites are unresponsive, slow transition type-js Generic JS issues
Projects
None yet
Development

No branches or pull requests

5 participants