Closed Bug 1174554 Opened 9 years ago Closed 9 years ago

hg shortlog loading slowly lately due to milestone lookups happening for each changeset

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: KWierso, Assigned: gps)

References

()

Details

Attachments

(1 file)

Filing this on behalf of the post in the URL field.

The shortlog for mozilla inbound is taking 14 seconds for me to load it. Similar load times for mozilla-central's shortlog.

Comm-central is only taking 1.2 seconds to load its shortlog.

The "last 10 days or so" lines up roughly when the mercurial upgrades were deployed, right?
I've noticed this too. I'll investigate.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Priority: -- → P1
This is a regression from bug 1171321. Something in the hgmo extension. I'm not sure what because `hg serve --profile` doesn't reveal anything useful for HTTP requests. But if I had to venture a guess, it would be the backout detection.
Depends on: 1171321
This is a result of obtaining the milestone for each changeset. Reading the milestone requires loading the manifest to resolve the filelog revision. Fixing this should be a matter of moving the milestone lookup to only happen in the changeset view, not the changelist view.
hgmo: don't resolve milestone when only cheap attributes are wanted (bug 1174554); r?smacleod

shortlog pages may request info on dozens of changesets. Resolving
manifests can take a few hundred milliseconds. This can result in page
load times of over 20 seconds.

Defer milestone resolution to the "onlycheap" section to avoid this
penalty.
Attachment #8622558 - Flags: review?(smacleod)
Comment on attachment 8622558 [details]
MozReview Request: hgmo: don't resolve milestone when only cheap attributes are wanted (bug 1174554); r?smacleod

https://reviewboard.mozilla.org/r/11391/#review9759

::: hgext/hgmo/__init__.py:59
(Diff revision 1)
> -    # fast, so just do it.
> +    # fast, so just do it. However, we need to defer this to the "onlycheap"
> +    # section because resolving manifests is relatively slow and resolving

I find it strange we're calling the "onlycheap" section things we do when onlycheap = False. I'd say `moving *out* of the "onlycheap"` makes more sense here (and in the commit message).
Attachment #8622558 - Flags: review?(smacleod) → review+
This is deployed but it won't take effect until the HTTP server processes refresh, which will take a few hours unless we force a restart. I'm inclined to wait.

FWIW, page load times should go from ~20s to ~0.250s.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 1171673
Summary: hg shortlog loading slowly lately → hg shortlog loading slowly lately due to milestone lookups happening for each changeset
Seems to be working, shortlog loads much quicker.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: