D1938: ui: Improve ui.write performance when not coloring on Windows

2018-02-02 Thread yuja (Yuya Nishihara)
yuja requested changes to this revision. yuja added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > cmdutil.py:1593 > else: > def write(s, **kw): > fp.write(s) We no longer need this `write()` wrapper because no labeling is required if

D1938: ui: Improve ui.write performance when not coloring on Windows

2018-01-26 Thread lothiraldan (Boris Feld)
lothiraldan added inline comments. INLINE COMMENTS > ui.py:887 > +return self._colormode is None > +def canbatchlabelwrites(self, **opts): > +'''check if write calls with labels are batchable''' Style nit, missing new line between the two methods REPOSITORY rHG Mercurial

D1938: ui: Improve ui.write performance when not coloring on Windows

2018-01-25 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger added inline comments. INLINE COMMENTS > cmdutil.py:1627 > +args = [iter(iterable)] * n > +return izip_longest(*args, fillvalue=('', '')) > + The grouping is necessary to avoid computing the full diff in memory with the associated memory use. Turns out splitti

D1938: ui: Improve ui.write performance when not coloring on Windows

2018-01-25 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger updated this revision to Diff 5005. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1938?vs=5003&id=5005 REVISION DETAIL https://phab.mercurial-scm.org/D1938 AFFECTED FILES mercurial/cmdutil.py mercurial/ui.py CHANGE DETAILS diff

D1938: ui: Improve ui.write performance when not coloring on Windows

2018-01-25 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger updated this revision to Diff 5003. joerg.sonnenberger retitled this revision from "[ui] Improve ui.write performance when not coloring on Windows" to "ui: Improve ui.write performance when not coloring on Windows". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https

D1938: [ui] Improve ui.write performance when not coloring on Windows

2018-01-25 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY For ``hg diff``, ui.write appears as super hot in the profile with up to 60% time spend in it for larger diffs. Introduce two predicates to decide if