summaryrefslogtreecommitdiff
path: root/plugins/irda
diff options
context:
space:
mode:
authorРоман Донченко <dpb@corrigendum.ru>2014-06-27 22:10:28 +0400
committerAnders Broman <a.broman58@gmail.com>2014-07-06 08:08:20 +0000
commitafa8f21f56f1e65bb2ec37cffdf3422d15b45347 (patch)
treebbb9b85dfdcc347cc44ce681e724ea80eb857923 /plugins/irda
parent3490bc6eb923e7e8666f9ad9213b0f5010a91c03 (diff)
downloadwireshark-afa8f21f56f1e65bb2ec37cffdf3422d15b45347.tar.gz
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/irda')
-rw-r--r--plugins/irda/Makefile.am10
-rw-r--r--plugins/irda/Makefile.nmake10
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/irda/Makefile.am b/plugins/irda/Makefile.am
index f83062f2d8..5af7e9cf2a 100644
--- a/plugins/irda/Makefile.am
+++ b/plugins/irda/Makefile.am
@@ -70,11 +70,11 @@ LIBS =
# 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
diff --git a/plugins/irda/Makefile.nmake b/plugins/irda/Makefile.nmake
index 79c2b8f62e..d13b42a3c3 100644
--- a/plugins/irda/Makefile.nmake
+++ b/plugins/irda/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