unison icon indicating copy to clipboard operation
unison copied to clipboard

Tab completion of (say) `view` takes a long time

Open pchiusano opened this issue 2 years ago • 4 comments

On bigger namespace trees in particular.

pchiusano avatar Aug 02 '22 14:08 pchiusano

@stew's hunch, which seems plausible to me, is that it's related to the change to self-contained namespaces and the lib convention. Before you'd have a single name for everything in base. Now it might appear as .base.Optional, .myproject.lib.base.Optional, myproject.lib.json.lib.base.Optional, myproject.lib.distributed.lib.base.Optional, etc.

ceedubs avatar Aug 02 '22 14:08 ceedubs

@ChrisPenner I'm thinking we should go ahead and try restricting the tab completion to prefix-matching, but that it should support both absolute and relative prefixes. What would that take?

aryairani avatar Aug 04 '22 15:08 aryairani

The relative prefix matching should be pretty easy, right now the absolute pattern matching is probably easy too.

If we want it to be future-proof for if we eventually stop keeping the whole root branch in memory I can rewrite it to use shallow branches for prefix searching, which should still be plenty fast, but doesn't require us to always have a global root branch.

It wouldn't take much extra work to do it that way, probably an extra hour or so, so that'd be my vote.

ChrisPenner avatar Aug 04 '22 20:08 ChrisPenner

If we want it to be future-proof for if we eventually stop keeping the whole root branch in memory I can rewrite it to use shallow branches for prefix searching, which should still be plenty fast, but doesn't require us to always have a global root branch.

That sounds good to me too.

pchiusano avatar Aug 04 '22 21:08 pchiusano