diff options
Diffstat (limited to 'source/luametatex/source/tex/texnodes.c')
-rw-r--r-- | source/luametatex/source/tex/texnodes.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/luametatex/source/tex/texnodes.c b/source/luametatex/source/tex/texnodes.c index 49a5b8fa7..63cf9e4c3 100644 --- a/source/luametatex/source/tex/texnodes.c +++ b/source/luametatex/source/tex/texnodes.c @@ -779,9 +779,11 @@ void lmt_nodelib_initialize(void) { properties, we create a new table and give it the original one as a metatable. After some experiments (that also included timing) with these scenarios I decided that a deep copy made no sense, nor did nilling. In the end both the shallow copy and the metatable variant were both - ok, although the second ons is slower. The most important aspect to keep in mind is that - references to other nodes in properties no longer can be valid for that copy. We could use two - tables (one unique and one shared) or metatables but that only complicates matters. + okay, although the metatables at that time performed a bit less. The most important aspect to + keep in mind is that references to other nodes in properties no longer can be valid for that + copy. We could use two tables (one unique and one shared) or metatables but that only + complicates matters. Maybe some day I will remove the method that not used in \CONTEXT, just + because switching methods during a run will for sure break things. When defining a new node, we could already allocate a table but it is rather easy to do that at the lua end e.g. using a metatable __index method. That way it is under macro package control. |