diff options
author | Роман Донченко <dpb@corrigendum.ru> | 2014-06-27 22:10:28 +0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-07-06 08:08:20 +0000 |
commit | afa8f21f56f1e65bb2ec37cffdf3422d15b45347 (patch) | |
tree | bbb9b85dfdcc347cc44ce681e724ea80eb857923 /plugins/wimax/Makefile.nmake | |
parent | 3490bc6eb923e7e8666f9ad9213b0f5010a91c03 (diff) | |
download | wireshark-afa8f21f56f1e65bb2ec37cffdf3422d15b45347.tar.gz wireshark-afa8f21f56f1e65bb2ec37cffdf3422d15b45347.tar.bz2 wireshark-afa8f21f56f1e65bb2ec37cffdf3422d15b45347.zip |
make-dissectors-reg: optimize by factoring out the loops
Instead of calling the grep/sed pipelines for each file, build the
list of files in the beginning and call each pipeline only once,
passing the list to the first grep.
This results in a massive speedup in Cygwin; in my test, the time
it takes to run make-dissector-reg . dissectors packet-*.c in dissectors/epan
is reduced from ~116 to ~3 seconds. I also tried it on NetBSD, where
the time do to the same goes from ~6 to ~0.5 seconds.
Amend makefile comments to elide mentions of invoking multiple processes
per file.
Change-Id: Iad441e7d2b6cc3669dada57646e2f8f6b987fd34
Reviewed-on: https://code.wireshark.org/review/2826
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/wimax/Makefile.nmake')
-rw-r--r-- | plugins/wimax/Makefile.nmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/wimax/Makefile.nmake b/plugins/wimax/Makefile.nmake index 52c4ea0604..981cf8f1d1 100644 --- a/plugins/wimax/Makefile.nmake +++ b/plugins/wimax/Makefile.nmake @@ -64,11 +64,11 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU # pass only the first few names in the list to the shell, for some # reason. # -# Therefore, we have a script to generate the plugin.c file. -# The shell script runs slowly, as multiple greps and seds are run -# for each input file; this is especially slow on Windows. Therefore, -# if Python is present (as indicated by PYTHON being defined), we run -# a faster Python script to do that work instead. +# Therefore, we use a script to generate the register.c file. +# There are two versions of the script, a shell and a Python version. +# The Python script runs faster, since it uses caching to speed up +# repeated runs and doesn't invoke external processes, so we prefer +# that if Python is available. # # The first argument is the directory in which the source files live. # The second argument is "plugin", to indicate that we should build |