gazorby/fifc

slowness with big completion list

Closed this issue · 0 comments

yannk commented

When fifc is invoked with a big list of possible completions, in my case > 1000 then it slows down significantly (maybe related to #20)

According to the profiling It seems to be because of the dir_test in the completion_group determination:

7	7	---> set -l dir_test "test -d '$complist[1]'"
13016	1091021	---> for comp in $complist[2..-1]...
32	40	----> set dir_test (string collect $dir_test " -a -d '$comp'")
8	8	-----> string collect $dir_test " -a -d '$comp'"
33	43	----> set dir_test (string collect $dir_test " -a -d '$comp'")
(...)
710	710	-----> string collect $dir_test " -a -d '$comp'"
1197	1932	----> set dir_test (string collect $dir_test " -a -d '$comp'")
735	735	-----> string collect $dir_test " -a -d '$comp'"
22	2363	---> if test -n "$is_null"...
5	5	----> test -n "$is_null"
2	2	----> test -n "$is_null"