Sambodhi Roy via Mailman-Developers writes:

 > For the plugin support, I tested the dynamic completion after
 > applying the null check fix using this:

 > time COMP_WORDS="mailman " COMP_CWORD=1 _MAILMAN_COMPLETE=bash_complete 
 > mailman

 > This gave a real-world latency of about 534 ms of calling Mailman
 > dynamically on every Tab press on my machine. I feel it's pretty
 > noticeable.

That might be acceptable on the first TAB on each command line if the
rest were instantaneous, but not for repeated TABs.  I seem to recall
the just noticable difference for typical humans is around 200 ms.
Maybe <300 ms would be OK.

 > 1. Dynamic completion only for subcommand names, with static
 > completion for options and choice values, the 534 ms latency would
 > only occur when the user Tabs after mailman to see subcommand names,
 > not for any subsequent option or choice completions.
 > 2. A mailman completion regenerate command that generates a fresh
 > static script including current plugin commands, which users run once
 > after installing or removing a plugin. This gives zero latency but
 > requires a manual step to stay current.

I think that you can improve #2 by quite a bit.  It's quite cheap to
stat the pidfile and determine if it's older than the static script,
and regenerate if not.  Perhaps better is to regenerate scripts for
all the shells on 'mailman start', which already takes a while.

Steve

-- 
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source    https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
_______________________________________________
Mailman-Developers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to