view contrib/plan9/proto @ 46775:c94fa884240b

rust: Preallocate the returned `Vec` in `utils::files::relativize_path` Profiling `rhg files > /dev/null` on an old snapshot of mozilla-central (with `perf` and the Firefox Profiler: https://github.com/firefox-devtools/profiler/blob/main/docs-user/guide-perf-profiling.md) showed non-trivial time spend in this function and in `realloc`. This change makes the wall-clock time for that process on my machine go from ~190 ms to ~150 ms. Differential Revision: https://phab.mercurial-scm.org/D10199
author Simon Sapin <simon.sapin@octobus.net>
date Sat, 13 Mar 2021 08:59:03 +0100
parents cf137319c6cd
children
line wrap: on
line source

lib	- sys sys
	mercurial	- sys sys
		hgrc.d	- sys sys
			9diff.rc	- sys sys
			factotum.rc	- sys sys
rc	- sys sys
	bin	- sys sys
		9diff	- sys sys
		hg	- sys sys
sys	- sys sys
	lib	- sys sys
		python	- sys sys
			lib	- sys sys
				python2.5	- sys sys
					site-packages	- sys sys
						hgext	- sys sys
							+	- sys sys
						mercurial	- sys sys
							+	- sys sys
						mercurial-VERSION-py2.5.egg-info	- sys sys
	src	- sys sys
		cmd	- sys sys
			hg	- sys sys
				+	- sys sys