D6594: RFC dirstatemap

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Mon Jul 8 10:16:28 EDT 2019


yuja added a comment.


  >   > I heard boxing a PyObject has measurable cost,
  >   Do you have a link to any benchmarks? I'd be interested.
  
  No number. IIRC, Augie tried to implement a parser by using nom, which
  was breezing fast, until converting parsed result back to PyObjects.
  I think we also have some cached PyObjects in our C extension.
  
  >   > so we might even want to keep the entire data backed by PyObjects 
  >   > depending on how frequently the data will be exposed to Python world.
  >   How would we decouple hg-core and hg-cpython then?
  
  By defining data-layer interface as trait?
  
  It might be less safe because of 'py' handle of rust-cpython, but if we
  plan to switch to PyO3, maybe we can ignore the issue for the time being.
  
  > If Python expects references to big objects (within `propertycache` for
  > instance), we still need to exchange a fair bit of data from Rust if Rust
  > does the heavy lifting.
  
  (I read "big" as "many".)
  
  Yes, so we'll probably want to minimize the data exchanged between Rust
  and Python. This means we'll eventually move more logic to Rust side, which
  hopefully reduce the number of elements to be exposed through the iterator
  interface. Until then, it might be better to move iterator-heavy objects
  to CPython/PyO3 layer. Just my guess.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6594/new/

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

To: Alphare, #hg-reviewers
Cc: yuja, durin42, kevincox, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list