zazu icon indicating copy to clipboard operation
zazu copied to clipboard

Does zazu have a constant internet connection?

Open TobiasDev opened this issue 4 years ago • 2 comments

I guess this is more a question than a bug-report. Is zazu always connected to internet? Since each time I reload the config it "loads" the plugins. Are they all part of the app installer, or is it constantly downloading them and checking for updates?

TobiasDev avatar Jul 02 '19 08:07 TobiasDev

Your plugins are installed locally. When the plugins are loaded by zazu (such as when reloading the config), zazu runs a clone function for each plugin but that won't actually do anything if the plugin is already cloned.

On a completely fresh install, you don't have any plugins and they are installed as part of the load process.

You should be able to see all your installed plugins in ~/.zazu/plugins. AFAIK plugins are only updated if you manually click on "Update Plugins" in the menu.

OscarBarrett avatar Jul 02 '19 08:07 OscarBarrett

Yeah, as @OscarBarrett explained, it won't download plugin code from Github again, nor install npm packages again.

But it will load plugins one by one https://github.com/tinytacoteam/zazu/blob/e6e37e63841ca4e8abd6bd6dfc7d211ae30d18d5/app/containers/pluginWrapper.js#L100

And each plugin load blocks one by one https://github.com/tinytacoteam/zazu/blob/e6e37e63841ca4e8abd6bd6dfc7d211ae30d18d5/app/packages/plugin.js#L79

And each block load it's JS code from FS https://github.com/tinytacoteam/zazu/blob/e6e37e63841ca4e8abd6bd6dfc7d211ae30d18d5/app/blocks/input/prefixScript.js#L14

So I guess the reason why it is slow and made you think it is download something, is because it is doing too much sync IO to disk.

There can be optimization on this, but not very necessary now.

Hope this solves your confusion.

linonetwo avatar Jul 02 '19 09:07 linonetwo