[Commented On] D10199: rust: Preallocate the returned `Vec` in `utils::files::relativize_path`

SimonSapin phabricator at mercurial-scm.org
Mon Mar 15 11:35:02 UTC 2021


SimonSapin added a comment.


  I haven’t measured memory at all but I’d expect the effect to be very small or not noticeable since this function is typically called for printing the return value to stdout then deallocating it immediately. We’re not accumulating many "relativized" paths in memory at any given time.

REPOSITORY
  rHG Mercurial

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

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

To: SimonSapin, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210315/0674d564/attachment-0002.html>


More information about the Mercurial-patches mailing list