D868: changelog: use attrs instead of namedtuple

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon Oct 23 10:59:15 EDT 2017


durin42 added a comment.


  @lothiraldan you very much buried the lede here (lots of data about things that didn't change, but no inline data on what didn't). The regressions appear to be:
  
  basic_commands.TimeTestSuite.time_id_current('mercurial-2017') 43.922ms -> 46.190ms
  basic_commands.TimeTestSuite.time_emptydiff('mercurial-2017') 43.185ms -> 45.353ms
  
  My guess is that this has to do with the import cost of attr, and that it doesn't scale linearly with the size of the repo. I'm disinclined to be concerned about the 1-2ms for now, especially given that we'll be able to pay the attr import cost once, but namedtuples are known to be expensive *per namedtuple* (so as we move from namedtuple to attr we should make this loss back.)
  
  (Other reviewers: please chime in if you disagree. I know there's a slippery slope for perf here, but I'm not inclined to worry at all about 44 vs 46 ms for id, or 43 vs 45 for empty-diff. It very much looks like once any actual statting has to be done the import cost is lost in the noise.)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D868

To: sid0, #hg-reviewers, durin42
Cc: lothiraldan, mercurial-devel


More information about the Mercurial-devel mailing list