view tests/test-inotify-issue1371.t @ 16363:2cdd7e63211b

parsers: incrementally parse the revlog index in C We only parse entries in a revlog index file when they are actually needed, and cache them when first requested. This makes a huge difference to performance on large revlogs when accessing the tip revision or performing a handful of numeric lookups (very common cases). For instance, "hg --time tip --template {node}" on a tree with 300,000 revs takes 0.15 before, 0.02 after. Even for revlog-intensive operations (e.g. running "hg log" to completion), the lazy approach is about 1% faster than the eager parse_index2.
author Bryan O'Sullivan <bryano@fb.com>
date Thu, 05 Apr 2012 13:00:35 -0700
parents 9965b90c7ed7
children 4f8054d3171b
line wrap: on
line source


  $ "$TESTDIR/hghave" inotify || exit 80
  $ hg init 
  $ touch a b c d e f
  $ echo "[extensions]" >> $HGRCPATH
  $ echo "inotify=" >> $HGRCPATH

inserve

  $ hg inserve -d --pid-file=hg.pid 2>&1
  $ cat hg.pid >> "$DAEMON_PIDS"
  $ hg ci -Am m
  adding a
  adding b
  adding c
  adding d
  adding e
  adding f
  adding hg.pid

let the daemon finish its stuff

  $ sleep 1

eed to test all file opperations

  $ hg rm a
  $ rm b
  $ echo c >> c
  $ touch g
  $ hg add g
  $ hg mv e h
  $ hg status
  M c
  A g
  A h
  R a
  R e
  ! b
  $ sleep 1

Are we able to kill the service? if not, the service died on some error

  $ kill `cat hg.pid`