From b82294b1bda0fcb2c0bf2594e4642d53ae0f4b87 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 16 Oct 2023 11:34:46 -0400 Subject: [PATCH] preproc/symtable (preproc:symtable-complete): Do not re-process imported symbols It's embarrassing how much time this saved on builds. This apparently has always been doing a linear scan on the entire symbol table for _every single param in the symbol table_, including those that were imported. This is not only unnecessary, but has no effect on the end result of the system. This cut build times almost in half, due to the number of symbols in some of our packages. All for unnecessary work. Like most things that have quadratic (or polynomial) time complexity, they don't show up during initial development, and are hard to even profile for, because their effects are so small. Now that our system has grown substantially, it had a massive effect. DEV-15114 --- src/current/include/preproc/symtable.xsl | 5 +++-- src/symtable/symbols.xsl | 5 +++++ test/symtable/symbols.xspec | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/current/include/preproc/symtable.xsl b/src/current/include/preproc/symtable.xsl index bac735d0..8f1ca9f5 100644 --- a/src/current/include/preproc/symtable.xsl +++ b/src/current/include/preproc/symtable.xsl @@ -843,7 +843,8 @@ - diff --git a/test/symtable/symbols.xspec b/test/symtable/symbols.xspec index 9f67ccdf..b6e62cd7 100644 --- a/test/symtable/symbols.xspec +++ b/test/symtable/symbols.xspec @@ -63,6 +63,7 @@ dim="1" desc="Vector param" dtype="footype" + need-resolve-dtype="true" default="" tex="" /> @@ -71,6 +72,7 @@ dim="2" desc="Matrix param with TeX" dtype="tex" + need-resolve-dtype="true" default="" tex="\tex" /> @@ -79,6 +81,7 @@ dim="0" desc="Scalar param (implicit)" dtype="bar" + need-resolve-dtype="true" default="" tex="" /> @@ -87,6 +90,7 @@ dim="0" desc="Scalar param (explicit)" dtype="bar" + need-resolve-dtype="true" default="" tex="" /> @@ -95,6 +99,7 @@ dim="-1" desc="Unknown dimension" dtype="wtf" + need-resolve-dtype="true" default="" tex="" />