Running a Kibana plugin for local development is very slow

Currently running yarn kbn bootstrap requires about half an hour on a modern computer. A lot of time is spent in the yarn linking process, which involves Kibana dev/testing dependencies like "storybook", etc.

This reflects also in how excruciatingly slow is the development cycle:

  1. yarn start
    .... many minutes... (boot, optimisation of a ton of deps...)
  2. interact with Kibana in the browser
  3. modify plugin code
  4. server crashes... back to 1

Is there a way to speed this up? Like, to avoid that yarn links any Kibana testing related dependencies? We only need to load the minimum bare bone Kibana, for the quickest bootstrap and development cycle.

Thank you!

@Simone_Scarduzio

Yes, running Kibana in development is slow, but it should not be as slow as you're experiencing. What machine are you using for development? What configuration?

I wonder if something is wrong with your development environment.

Hi @mattkime, thanks for taking the time to answer this.
I have the latest dell xps 13 2-in-1 7390 with the Intel i7-1065G7 quad core processor.

In the meantime, I was able to greatly improve the situation moving from Windows 10 to Ubuntu 19.10.

I have the feeling that with Windows, processes that access a very large number of files becomes really slow. Any other development process that did not involve node_modules was fast.

1 Like

@Simone_Scarduzio I can confirm that running on Windows is particularly slow, probably for the reasons you mention.

There are some workarounds, but I haven't gotten around to testing them particularly with Kibana.

I also switched to Linux and now bootstrapping takes only a minute or so.

1 Like

@Simone_Scarduzio

You might find better results running the Windows Subsystem for Linux.

@Liza_Katz yeah right? I even took care of disabling all malware scanning witchcraft Microsoft enabled by default (I think it's called Defender). And it's super slow from WSL (version 1), and even native Windows CLI (calling yarn from Powershell).

One more thing I noticed, was that even copying the Kibana project to another directory was slow (no change if I used the linux command cp -r kibana kibana_new from WSL (version1) or the same operation using the native windows file manager GUI).

The thing I did not try is to use WSL2 which uses actual virtualization. Will test it next week and report.

I recently spoke to someone who had good things to say about WSL2 - I should have specified the latest version.

Just tested Windows 10 with a WSL2 ubuntu 19.10, freshly cloned kibana repository, checkout tag v7.6.1, yarn kbn bootstrap takes 8 minutes.

However, this bug made me go back to Linux

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.