syncat icon indicating copy to clipboard operation
syncat copied to clipboard

Time seems to increase exponentially with adding queries

Open mister-choo opened this issue 1 year ago • 0 comments

I measured how much time it takes syncat to cat a file (lua as an example): No queries:

Executed in    6.34 millis    fish           external
   usr time    2.22 millis  280.00 micros    1.94 millis
   sys time    4.03 millis  158.00 micros    3.87 millis

5 queries:

Executed in   24.59 millis    fish           external
   usr time   23.13 millis    0.00 micros   23.13 millis
   sys time    1.44 millis  436.00 micros    1.00 millis

More queries:

Executed in  303.62 millis    fish           external
   usr time  301.97 millis    0.00 micros  301.97 millis
   sys time    1.47 millis  466.00 micros    1.00 millis

These queries have by far the biggest impact:

function_call > identifier & "assert", "collectgarbage", "dofile", "error", "getfenv", "getmetatable", "ipairs", "load", "loadfile", "loadstring", "module", "next", "pairs", "pcall", "print", "rawequal", "rawget", "rawlen", "rawset", "require", "select", "setfenv", "setmetatable", "tonumber", "tostring", "type", "unpack", "xpcall", "__add", "__band", "__bnot", "__bor", "__bxor", "__call", "__concat", "__div", "__eq", "__gc", "__idiv", "__index", "__le", "__len", "__lt", "__metatable", "__mod", "__mul", "__name", "__newindex", "__pairs", "__pow", "__shl", "__shr", "__sub", "__tostring", "__unm" {
    color: $function_builtin;
}
"+", "@", "~", "&", "|", ":", "::", "?", "#", "=", "(", ")", "[", "]", "{", "}", "<", ">", ".", ",", ";", ":", "::", ".", "..", "...", "*", "/", "%", "^", "#", "+", "-", "*", "/", "%", "^", "#", "==", "~=", "<=", ">=", "<", ">", "=", "&", "~", "|", "<<", ">>", "//", "..", "...", "and", "not", "or" {
        color: $operator
}

mister-choo avatar Dec 03 '24 17:12 mister-choo