Commit Graph

3 Commits

Author SHA1 Message Date
Bryan O'Sullivan
562cfc4b72 dirs: use mutable strings internally
perfdirs results for a working dir with 170,000 files:
  Python     638 msec
  C          244
  C+int      192
  C+int+str  168

In the large repo above, the nearly 0.5 second time improvement is
visible in commands like "hg add" and "hg update".

hg add
  Python    1100 msec
  C+int+str  600

hg update (with nothing to do)
  Python    2800 msec
  C+int+str 2240
2013-04-10 15:08:28 -07:00
Bryan O'Sullivan
601384a79a dirs: use mutable integers internally
These integers are not visible to Python code, so this is safe.

perfdirs results for a working dir with 170,000 files:
  Python     638 msec
  C          244
  C+int      192
2013-04-10 15:08:27 -07:00
Bryan O'Sullivan
8f78d582d5 scmutil: rewrite dirs in C, use if available
This is over twice as fast as the Python dirs code. Upcoming changes
will nearly double its speed again.

perfdirs results for a working dir with 170,000 files:
  Python     638 msec
  C          244
2013-04-10 15:08:27 -07:00