Re: [PATCH] diff: do not reuse worktree files that need "clean" conversion
Jeff King <peff@peff.net> writes:
> So I think we actually _can_ think of would_convert_to_git() as
> basically free. Or as free as other efficient-lookup functions we call
> like cache_name_pos().
Show 8 quoted lines
> The thought "does this tree reuse even speed things up enough to justify
> its complexity" definitely crossed my mind. It's basically swapping
> open/mmap for zlib inflating the content.
>
> But I do think it helps in the "want_file" case (i.e., when we are
> writing out a tempfile for an external command via prepare_temp_file()).
> There it helps us omit writing a tempfile to disk entirely, including
> any possible conversion.