diff options
author | Steven Barth <steven@midlink.org> | 2008-09-09 12:44:41 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-09 12:44:41 +0000 |
commit | 8dbf29e86e984e9de87ad0724a99cab89f2d8ea6 (patch) | |
tree | 158b52a64bd1ac91e5dff563f939b18b5084af84 /libs/web | |
parent | 023b4ddf646438cfb0a468fdcb3a32945b239e20 (diff) |
Performance optimisations:
In-line expressions are faster than function calls
Diffstat (limited to 'libs/web')
-rw-r--r-- | libs/web/luasrc/template.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/web/luasrc/template.lua b/libs/web/luasrc/template.lua index 4aa9b0933..dc6e5bb7d 100644 --- a/libs/web/luasrc/template.lua +++ b/libs/web/luasrc/template.lua @@ -63,7 +63,7 @@ function compile(template) -- Search all <% %> expressions local function expr_add(ws1, skip1, command, skip2, ws2) - table.insert(expr, command) + expr[#expr+1] = command return ( #skip1 > 0 and "" or ws1 ) .. "<%" .. tostring(#expr) .. "%>" .. ( #skip2 > 0 and "" or ws2 ) |