From 23bb61a5ca3d3889aa2d877c11fc344b689c7534 Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Sun, 18 Feb 2024 00:30:05 +0100 Subject: [PATCH] another linked property for speed --- CHANGELOG.md | 3 +++ tagpdf-backend.dtx | 6 ++++++ tagpdf-mc-shared.dtx | 2 +- tagpdf.dtx | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d37d44e..d12fa75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] ### Fixed - missing slashes in dvilualatex backend, issue #96 + +### Changed + - speed gain by using linked properties ## [2024-02-04] Version 0.98v diff --git a/tagpdf-backend.dtx b/tagpdf-backend.dtx index be567f24..b85ea8a9 100644 --- a/tagpdf-backend.dtx +++ b/tagpdf-backend.dtx @@ -97,6 +97,12 @@ \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 = {} } } +\cs_set_protected:Npn \@@_prop_new_linked:N #1 + { + \prop_new_linked:N #1 + \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 = {} } + } + \cs_set_protected:Npn \@@_seq_new:N #1 { diff --git a/tagpdf-mc-shared.dtx b/tagpdf-mc-shared.dtx index c38d7b8e..081a7995 100644 --- a/tagpdf-mc-shared.dtx +++ b/tagpdf-mc-shared.dtx @@ -240,7 +240,7 @@ % key: absolute number of the mc (tagmcabs)\\ % value: the structure number the mc is in % \begin{macrocode} -\@@_prop_new:N \g_@@_mc_parenttree_prop +\@@_prop_new_linked:N \g_@@_mc_parenttree_prop % \end{macrocode} % \end{variable} % diff --git a/tagpdf.dtx b/tagpdf.dtx index ad8f1950..4e0e63bc 100644 --- a/tagpdf.dtx +++ b/tagpdf.dtx @@ -425,6 +425,7 @@ % \begin{macro} % { % \@@_prop_new:N +% ,\@@_prop_new_linked:N % ,\@@_seq_new:N % ,\@@_prop_gput:Nnn % ,\@@_seq_gput_right:Nn @@ -435,6 +436,7 @@ % } % \begin{macrocode} \cs_set_eq:NN \@@_prop_new:N \prop_new:N +\cs_set_eq:NN \@@_prop_new_linked:N \prop_new_linked:N \cs_set_eq:NN \@@_seq_new:N \seq_new:N \cs_set_eq:NN \@@_prop_gput:Nnn \prop_gput:Nnn \cs_set_eq:NN \@@_seq_gput_right:Nn \seq_gput_right:Nn