[Bug 6445] New: hg log command taking 115 seconds with large added css file

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Nov 27 16:40:02 UTC 2020


https://bz.mercurial-scm.org/show_bug.cgi?id=6445

            Bug ID: 6445
           Summary: hg log command taking 115 seconds with large added css
                    file
           Product: Mercurial
           Version: stable branch
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: petersanchez at gmail.com
                CC: mercurial-devel at mercurial-scm.org
    Python Version: ---

hg version 5.6+8-81da6feb5000

We're adding a large css file (281k lines) to an existing project. It was added
in a feature branch. Trying to run a log command, with preview, etc. on the
specific revision where the file was added to the repo takes over 100 seconds.

Other team members with hg versions 5.6 (installed via pip) and 5.2.1 do not
have this issue.

The revision included small changes to about 5-6 other text files (.py, .js,
etc.)

I stepped through each file one by one and only the large css file had this
issue.

Below is the profile data and debug install:


hg log -r 269 hyfm/static/css/tailwind.css -p --profile
...

| 100.0% 163.48s  dispatch.py:    run              line 43:  dispatch.run()
| 100.0% 163.48s  dispatch.py:    dispatch         line 113:  status =
dispatch(req)
| 100.0% 163.48s  dispatch.py:    _runcatch        line 303:  ret =
_runcatch(req) or 0
| 100.0% 163.48s  dispatch.py:    _callcatch       line 479:  return
_callcatch(ui, _runc...
| 100.0% 163.48s  scmutil.py:     callcatch        line 488:  return
scmutil.callcatch(ui...
| 100.0% 163.48s  dispatch.py:    _runcatchfunc    line 153:  return func()
| 100.0% 163.48s  dispatch.py:    _dispatch        line 469:  return
_dispatch(req)
| 100.0% 163.47s  dispatch.py:    runcommand       line 1232:  return
runcommand(
| 100.0% 163.47s  pager.py:       pagecmd          line 917:  ret =
_runcommand(ui, optio...
| 100.0% 163.46s  dispatch.py:    _runcommand      line 76:  return orig(ui,
options, cm...
| 100.0% 163.46s  dispatch.py:    <lambda>         line 1244:  return cmdfunc()
| 100.0% 163.46s  util.py:        check            line 1230:  d = lambda:
util.checksigna...
| 100.0% 163.46s  commands.py:    log              line 1867:  return
func(*args, **kwargs)
| 100.0% 163.45s  logcmdutil.py:  displayrevs      line 4609:  displayfn(ui,
repo, revs, d...
 \ 64.9% 106.07s  logcmdutil.py:  show             line 1191: 
displayer.show(ctx, copies=...
   | 64.9% 106.07s  logcmdutil.py:  _show          line 276:  self._show(ctx,
copies, props)
   | 64.9% 106.07s  logcmdutil.py:  _showpatch     line 399: 
self._showpatch(ctx, graphw...
   | 64.9% 106.07s  logcmdutil.py:  showdiff       line 431: 
self._differ.showdiff(
   | 64.9% 106.07s  logcmdutil.py:  diffordiffstat line 215:  diffordiffstat(
   | 64.9% 106.07s  util.py:        filechunkiter  line 173:  for chunk in
util.filechunk...
   | 64.9% 106.07s  util.py:        read           line 2695:  s = nbytes and
f.read(nbytes)
   | 64.8% 105.92s  util.py:        splitbig       line 2635:  for chunk in
self.iter:
   | 64.8% 105.87s  logcmdutil.py:  gen            line 2606:  for chunk in
chunks:
   | 63.8% 104.30s  patch.py:       difflabel      line 170:  for chunk, label
in chunks:
   | 63.6% 104.03s  patch.py:       consumehunkbufferline 2863:  for token in
consumehunkbuf...
   | 63.6% 104.01s  patch.py:       diffsinglehunkinlineline 2832:  for token
in dodiffhunk(hun...
 \ 35.1% 57.38s  logcmdutil.py:  flush             line 1192: 
displayer.flush(ctx)
   | 35.1% 57.38s  ui.py:          write           line 265: 
self.ui.write(self.hunk[rev])
   | 35.1% 57.38s  procutil.py:    write           line 1158:  dest.write(msg)
---
Sample count: 59297
Total time: 115.960000 seconds (163.480000 wall)

(e250a06) pjs:thinkpad ~/development/hyfm $ hg debuginstall
checking encoding (UTF-8)...
checking Python executable (/usr/bin/python)
checking Python implementation (CPython)
checking Python version (3.8.5)
checking Python lib (/usr/lib/python3.8)...
checking Python security support (sni,tls1.0,tls1.1,tls1.2)
checking Rust extensions (missing)
checking Mercurial version (5.6)
checking Mercurial custom build (8-81da6feb5000)
checking module policy (c)
checking installed modules
(/usr/local/lib/python3.8/dist-packages/mercurial)...
checking registered compression engines (bz2, bz2truncated, none, zlib, zstd)
checking available compression engines (bz2, bz2truncated, none, zlib, zstd)
checking available compression engines for wire protocol (zstd, zlib, bz2,
none)
checking "re2" regexp engine (missing)
checking templates
(/usr/local/lib/python3.8/dist-packages/mercurial/templates)...
checking default template
(/usr/local/lib/python3.8/dist-packages/mercurial/templates/map-cmdline.default)
checking commit editor... (vim)
checking username (Peter Sanchez <peter at netlandish.com>)
no problems detected

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list