# HG changeset patch # User Waqas Hussain # Date 1290731172 -18000 # Node ID 4bc88bb748d1b89b1a4202ba43895be87cde6c7c # Parent 889ef938552c92cc7544e26674cd795e428ccd2a util.template: Don't add stanza.last_add. 20% faster. diff -r 889ef938552c -r 4bc88bb748d1 util/template.lua --- a/util/template.lua Fri Nov 26 05:24:59 2010 +0500 +++ b/util/template.lua Fri Nov 26 05:26:12 2010 +0500 @@ -78,7 +78,7 @@ end local function create_clone_string(stanza, lookup, xmlns) if not lookup[stanza] then - local s = ('setmetatable({name=%q,attr=%s,last_add={},tags={'):format(stanza.name, create_attr_string(stanza.attr, xmlns)); + local s = ('setmetatable({name=%q,attr=%s,tags={'):format(stanza.name, create_attr_string(stanza.attr, xmlns)); -- add tags for i,tag in ipairs(stanza.tags) do s = s..create_clone_string(tag, lookup, stanza.attr.xmlns)..";";