Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow startup for CLI? #102

Open
krisskross opened this issue Jan 12, 2018 · 1 comment
Open

Slow startup for CLI? #102

krisskross opened this issue Jan 12, 2018 · 1 comment

Comments

@krisskross
Copy link

krisskross commented Jan 12, 2018

I'm trying out drip for a java CLI. The drip/client side is a only a UNIX socket sending command args to the server listener which respond to various commands. This makes the client part very thin since jar dependencies are packaged on the server. Hopefully this setup can be enough for bash auto completion as well.

However, when i run a test between drip and java they seem to perform equally fast? But maybe i'm missing or doing something wrong?

I have created a super-simple project that demonstrate the client/server functionality here: https://github.com/deephacks/drip-test

The tests can be run like this:

  1. Start the listening side on /tmp/serv.sock
    $ ./run drip server

  2. Run the drip test
    $ for i in {1..5}; do time ./run drip drip-msg; done

  3. Run the drip test
    $ for i in {1..5}; do time ./run java java-msg; done

Here's a sample run.

  • Java
$ for i in {1..5}; do time ./run java java-msg; done
java-msg echoes

real	0m0.328s
user	0m0.592s
sys	0m0.016s
msg echoes

real	0m0.267s
user	0m0.484s
sys	0m0.032s
java-msg echoes

real	0m0.273s
user	0m0.516s
sys	0m0.024s
java-msg echoes

real	0m0.271s
user	0m0.536s
sys	0m0.020s
java-msg echoes

real	0m0.280s
user	0m0.556s
sys	0m0.016s
  • Drip
$ for i in {1..5}; do time ./run drip drip-msg; done

drip-msg echoes

real	0m0.354s
user	0m0.604s
sys	0m0.032s


drip-msg echoes

real	0m0.332s
user	0m0.020s
sys	0m0.012s


drip-msg echoes

real	0m0.291s
user	0m0.020s
sys	0m0.008s


drip-msg echoes

real	0m0.285s
user	0m0.016s
sys	0m0.016s


drip-msg echoes

real	0m0.282s
user	0m0.020s
sys	0m0.008s

Cheers! Awesome project!

@kovyrin
Copy link

kovyrin commented Dec 3, 2020

AFAIU it is caused by the fact that drip needs to execute your command and, at the same time, start another JVM process in the background, creating resource contention and causing the slowdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants