Open RaphyJake opened 3 years ago
Unfortunately there's no fnacy way to start threads in Lua (which is the plugins' language). By this reason at this time we need to wait for checkCli()
to finish execution before actually opening the terminal. Also in micro everything seems to be run synchronous.
Unfortunately there's no fnacy way to start threads in Lua (which is the plugins' language). By this reason at this time we need to wait for
checkCli()
to finish execution before actually opening the terminal. Also in micro everything seems to be run synchronous.
Regardless of whether this is fixable right now, this is still a pretty ridiculous downside to the plugin and needs to either be addressed or be given proper notice on the README. I decidedly won't be using this plugin due to the insane delay.
Here's a solution: Remembering the last time a check was made, and then not making a request for a week or at least a day later. Or caching the S3 bucket response, however you'd like to go about it.
In my opinion, update checking should be made part of the CLI itself, and not offloaded to the plugin to check.
A 2 second delay for using Micro is UNACCEPTABLE. This issue is not resolved.
the
checkCli()
call in theinit()
function takes about two seconds on my machine:This is reasonable, my internet connection is not one of the best. Still, since in these two seconds I can't use micro (and I tend to open / close micro a lot) I was wondering if there was some way to make micro instantly usable, for instance by doing the update-checking part concurrently (at the risk of losing a few keystrokes if you start typing with an outdated wakatime cli)
micro version: