[Performance] Copying files with utils::fs::copy_files_except_ext
is slow
#2348
Labels
C-enhancement
Category: Enhancement or feature request
Problem
Our book is growing and by now building it takes approx. 1m30s. Most of the time is spent in
HtmlHandlebars::render
when copying files from src to dest.In a small proof-of-concept I replaced the call to
copy_files_except_ext
locally withrsync
. Execution time dropped to 8s.Proposed Solution
The
copy_files_except_ext
seems to be a bottleneck. Various performance improvements can be thought of:rsync
if available. Very fast, allows for exclude patterns.Notes
I've seen the comment on recursion while copying. I did not dig into that but is it really an issue? Only if the target directory is a sub-directory of source or if we encounter a (sym-)link into the target directory somewhere in source, I would assume. Both would be strange setups, wouldn't it?
The text was updated successfully, but these errors were encountered: