diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2018-08-05 06:16:44 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-10-08 20:56:08 -0300 |
commit | a634da282b7c5963d69a0c9105436e55382a5ccb (patch) | |
tree | 48c1c674bc92cb2345fe350fcf615ec92cdd2aca /libavcodec/pthread_internal.h | |
parent | df6e929e89340c2dbb316868c798fce516a2cf79 (diff) | |
download | ffmpeg-a634da282b7c5963d69a0c9105436e55382a5ccb.tar.gz |
configure: speed up check_deps()
x4 - x25 faster.
check_deps() recursively enables/disables components, and its loop is
iterated nearly 6000 times. It's particularly slow in bash - currently
consuming more than 50% of configure runtime, and about 20% with other
shells.
This commit applies few local optimizations, most effective first:
- Use $1 $2 ... instead of pushvar/popvar, and same at enable_deep*
- Abort early in one notable case - empty deps, to avoid costly no-op.
- Smaller changes which do add up:
- Handle ${cfg}_checking locally instead of via enable[d]/disable
- ${cfg}_checking: test done before inprogress - x2 faster in 50%+
- one eval instead of several at the empty-deps early abort path.
- The "actual work" part is unmodified - just its surroundings.
Biggest speedups (relative and absolute) are observed with bash.
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 45499e557c808f43175524a98901efeca715813e)
Diffstat (limited to 'libavcodec/pthread_internal.h')
0 files changed, 0 insertions, 0 deletions