D1458: workers: implemented worker on windows

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Nov 20 23:03:53 EST 2017

indygreg added a comment.

  I haven't looked at the code in much detail.
  The use of threads for the workers on Windows is obviously better performance wise than the current world where we use a single thread in a single process. However, we'll hit the upper limit of performance pretty quickly because the process will be CPU bound in revlogs. And the upper limit with Python threads will be much worse than the upper limit with a concurrency primitive that doesn't have the GIL.
  FWIW, last I checked we only had 1 consumer of the worker API in core: working directory updates. Given limited users of this API and the inability to easily implement multi-process workers on Windows (figuring out how to invoke a new Python process is not trivial because the ways Mercurial can be invoked on Windows), I've been very tempted to remove the worker API. I'm actually thinking about replacing its one use case with Rust. But I don't have any code to show for that and likely won't for several weeks. That being said, I don't want to discourage this code from landing. If others feel it is useful, let's get it in. But its lifetime may be short if the Rust solution materializes.

  rHG Mercurial


To: wlis, #hg-reviewers
Cc: indygreg, mercurial-devel

More information about the Mercurial-devel mailing list