src/current/compiler/map.xsl: Omit preproc:from from retmap symbols

preproc:sym/preproc:from is used for generating `knownFields` using the
_input_ map, so this has no use for return map values; the map still
produces edges to its dependencies.

The issue is that there are return map entries in some of our systems that
are producing multiple `preproc:from`, but I somewhat-recently modified the
system to support only a single map, to remove dynamic allocation.  This
resolves that problem.

With that said, `knownFields` was created for Liza to know when the
classifier ought to be invoked, to save time.  Back when it was first
introduced ~10y ago, this provided significant savings, however the
structure of our system now is such that nearly every single field invokes
the classifier.

Furthermore, these details should remain encapsulated; if we wanted to make
that determination, we should be provided with a delta, which we could also
use to do incremental classification in the future, if there's an ROI there
after other improvements have been made.

So, eventually, preproc:sym/preproc:from will go away entirely.

DEV-10936
main
Mike Gerwitz 2022-05-04 09:26:18 -04:00
parent 1ad2fb1dc8
commit 602cec5560
2 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,6 @@
# This number is incremented for every compiler change to force rebuilding
# of xmlo files.
5
6
# 6: Return map omit preproc:sym/preproc:from

View File

@ -346,6 +346,14 @@
</call-template>
</template>
<!-- Omit preproc:from for return map entries, which
do not contribute to knownFields -->
<template match="/*[ @lvmc:type='retmap' ]/lvm:pass" mode="preproc:symtable" priority="6">
<call-template name="lvmc:mapsym">
<with-param name="name" select="@name" />
</call-template>
</template>
<template match="lvm:pass" mode="preproc:depgen" priority="5">
<preproc:sym-dep name=":map:{@name}" />
@ -619,11 +627,6 @@
<call-template name="lvmc:mapsym">
<with-param name="name" select="$to" />
<with-param name="from">
<for-each select=".//lvm:from">
<preproc:from name="{@name}" />
</for-each>
</with-param>
</call-template>
</template>