From 0928896935411078a17e8dc45c9065c25fa14319 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 13 Oct 2023 16:02:42 -0400 Subject: [PATCH] summary.xsl: Introduce maps for l:dep and preproc:symtable This begins to chip away at the terrible performance of this system by using maps where linear scans of the symbol table were otherwise taking place. This does not yet touch `preproc:sym-deps`, which has the same problem. Further, we may be able to get rid of symbol table maps per package by utilizing `l:dep`; more to come. This trims ~40s off of one of our larger programs (3m -> 2m20s), which is a start, but there's still a ton of room for improvement. I don't expect it to be blazingly fast after all the optimization attempts---this has the same problem as the XSLT-based linker did, which ended up being reimplemented in Rust as TAMER---but it'll help to improve times in the meantime. DEV-15153 --- src/current/summary.xsl | 109 +++++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 46 deletions(-) diff --git a/src/current/summary.xsl b/src/current/summary.xsl index 4410957a..9d98670d 100644 --- a/src/current/summary.xsl +++ b/src/current/summary.xsl @@ -27,6 +27,7 @@ xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:lv="http://www.lovullo.com/rater" xmlns:lvp="http://www.lovullo.com" xmlns:c="http://www.lovullo.com/calc" @@ -64,6 +65,14 @@ + + + <!DOCTYPE html> - + @@ -144,30 +153,45 @@ - + + + + + + + - - + [summary] typesetting package ... - - + + + + + + + + + @@ -317,16 +341,9 @@ - - + @@ -344,7 +361,7 @@ - + @@ -628,6 +645,8 @@ FIXME: this is broken! --> + + param @@ -656,10 +675,7 @@ local-name()" /> - - + + + - + match any value in @@ -1227,10 +1243,11 @@ @return match HTML --> + + - + = @@ -1255,11 +1272,13 @@ + + + select="$symtable-map( $name )" /> @@ -1387,6 +1406,8 @@ + + @@ -1401,9 +1422,7 @@ - + @@ -1647,6 +1666,8 @@ + + @@ -1691,9 +1712,7 @@ - + - - +