From 132fc95c68352548de1cd6871ad08109da3d0ad3 Mon Sep 17 00:00:00 2001 From: Anthony Carapetis Date: Tue, 15 Nov 2022 01:20:30 +1100 Subject: [PATCH] [xml] Improve performance in scml to quakeml XSLT (#74) SCML documents describing large earthquakes were taking a long time to convert to QuakeML, with almost all that time being spent in the loop that outputs picks that aren't referenced by amplitudes. (For example, an event with ~600 arrivals in its preferred origin was taking 12 seconds.) By precomputing the list of referenced amplitudes once per origin (rather than computing it on the fly for each pick), performance is greatly improved (down to 400ms in my 600-arrival example). --- libs/xml/0.10/sc3ml_0.10__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.11/sc3ml_0.11__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.12/sc3ml_0.12__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.5/sc3ml_0.5__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.6/sc3ml_0.6__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.7/sc3ml_0.7__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.8/sc3ml_0.8__quakeml_1.2.xsl | 14 ++++++-------- libs/xml/0.9/sc3ml_0.9__quakeml_1.2.xsl | 14 ++++++-------- 8 files changed, 48 insertions(+), 64 deletions(-) diff --git a/libs/xml/0.10/sc3ml_0.10__quakeml_1.2.xsl b/libs/xml/0.10/sc3ml_0.10__quakeml_1.2.xsl index 05bd6b347..55a447c84 100644 --- a/libs/xml/0.10/sc3ml_0.10__quakeml_1.2.xsl +++ b/libs/xml/0.10/sc3ml_0.10__quakeml_1.2.xsl @@ -176,6 +176,8 @@ * - Skip originUncertaintyDescription if value is set to * 'probability density function' not supported by QuakeML. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.11/sc3ml_0.11__quakeml_1.2.xsl b/libs/xml/0.11/sc3ml_0.11__quakeml_1.2.xsl index 26a31a2a1..a5f796343 100644 --- a/libs/xml/0.11/sc3ml_0.11__quakeml_1.2.xsl +++ b/libs/xml/0.11/sc3ml_0.11__quakeml_1.2.xsl @@ -182,6 +182,8 @@ * - Skip originUncertaintyDescription if value is set to * 'probability density function' not supported by QuakeML. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.12/sc3ml_0.12__quakeml_1.2.xsl b/libs/xml/0.12/sc3ml_0.12__quakeml_1.2.xsl index 6e1faa86a..883ce4132 100644 --- a/libs/xml/0.12/sc3ml_0.12__quakeml_1.2.xsl +++ b/libs/xml/0.12/sc3ml_0.12__quakeml_1.2.xsl @@ -195,6 +195,8 @@ * 'bomb detonation', 'moving aircraft' and 'atmospheric meteor explosion' * to QuakeML 'other event'. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.5/sc3ml_0.5__quakeml_1.2.xsl b/libs/xml/0.5/sc3ml_0.5__quakeml_1.2.xsl index 990fff692..6a92cd10b 100644 --- a/libs/xml/0.5/sc3ml_0.5__quakeml_1.2.xsl +++ b/libs/xml/0.5/sc3ml_0.5__quakeml_1.2.xsl @@ -172,6 +172,8 @@ * * * 10.12.2018: Put the non-QuakeML nodes in a custom namespace * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.6/sc3ml_0.6__quakeml_1.2.xsl b/libs/xml/0.6/sc3ml_0.6__quakeml_1.2.xsl index 26ab0859f..e213b9a84 100644 --- a/libs/xml/0.6/sc3ml_0.6__quakeml_1.2.xsl +++ b/libs/xml/0.6/sc3ml_0.6__quakeml_1.2.xsl @@ -176,6 +176,8 @@ * - Skip originUncertaintyDescription if value is set to * 'probability density function' not supported by QuakeML. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.7/sc3ml_0.7__quakeml_1.2.xsl b/libs/xml/0.7/sc3ml_0.7__quakeml_1.2.xsl index 4e02ca583..547c851b2 100644 --- a/libs/xml/0.7/sc3ml_0.7__quakeml_1.2.xsl +++ b/libs/xml/0.7/sc3ml_0.7__quakeml_1.2.xsl @@ -176,6 +176,8 @@ * - Skip originUncertaintyDescription if value is set to * 'probability density function' not supported by QuakeML. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.8/sc3ml_0.8__quakeml_1.2.xsl b/libs/xml/0.8/sc3ml_0.8__quakeml_1.2.xsl index 473d646c2..457562ca7 100644 --- a/libs/xml/0.8/sc3ml_0.8__quakeml_1.2.xsl +++ b/libs/xml/0.8/sc3ml_0.8__quakeml_1.2.xsl @@ -176,6 +176,8 @@ * - Skip originUncertaintyDescription if value is set to * 'probability density function' not supported by QuakeML. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + + diff --git a/libs/xml/0.9/sc3ml_0.9__quakeml_1.2.xsl b/libs/xml/0.9/sc3ml_0.9__quakeml_1.2.xsl index 47de45088..5ddbe95e9 100644 --- a/libs/xml/0.9/sc3ml_0.9__quakeml_1.2.xsl +++ b/libs/xml/0.9/sc3ml_0.9__quakeml_1.2.xsl @@ -176,6 +176,8 @@ * - Skip originUncertaintyDescription if value is set to * 'probability density function' not supported by QuakeML. * + * * 31.10.2022: Improve performance when processing origins with many arrivals. + * ********************************************************************** --> - - - - + + + +