Skip to content

string length --visible performance #8253

@IlanCosman

Description

@IlanCosman

Some escape codes are 70-90 times slower than others on my machine.
Just thought it was interesting and worth mentioning. Obviously not critical at all.

function foo
    string length --visible (string repeat --count 1000 (set_color normal)"hello")
end

function bar
    string length --visible (string repeat --count 1000 (set_color blue)"hello")
end
ilan@arch ~> time foo
5000

________________________________________________________
Executed in  118.72 millis    fish           external
   usr time  118.13 millis  118.13 millis    0.00 micros
   sys time    0.00 millis    0.00 millis    0.00 micros

ilan@arch ~> time bar
5000

________________________________________________________
Executed in    1.71 millis    fish           external
   usr time    0.00 millis    0.00 millis    0.00 micros
   sys time    1.70 millis    1.70 millis    0.00 micros

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions