complete-alias icon indicating copy to clipboard operation
complete-alias copied to clipboard

Slow sourcing time

Open SuperSandro2000 opened this issue 4 years ago • 3 comments

Before adding this my bashrc took roughly 200ms to load. With this enabled for 6 aliases it takes roughly 600ms which is a bit much for my liking. Do you think this could be improved?

SuperSandro2000 avatar Aug 15 '21 10:08 SuperSandro2000

It's likely some recent changes slow it down. Sourcing can take about 500ms.

If you need some quick solution, rollback before that commit.

I will follow up when I figure out what's the right thing to do here.

cykerway avatar Aug 16 '21 05:08 cykerway

To keep things simple, I disabled the problematic feature in version 1.17.0.

So just check out that version and use it as usual. The sourcing takes about 5ms. No special configuration needed.

cykerway avatar Aug 16 '21 16:08 cykerway

The feature is reworked in version 1.18.0. Now it is disabled by default, but can be enabled by setting an envar COMPAL_AUTO_UNMASK=1 before sourcing the main script.

When disabling this feature, the sourcing time is about 5ms. When enabling it, the sourcing time is about 30ms (depending on how many command completions you have, tested with 100-200 completions). If sourcing time is important to you, my advise is to disable this feature.

cykerway avatar Aug 17 '21 12:08 cykerway