<@U078LAH62> what’s the startup time of minibox?
# box-products
d
@foundeo what’s the startup time of minibox?
f
depends highly on the hardware / network — network to pull in the image (which is less than 100mb)
here’s an example of running a fixinator scan which uses cfml-ci-tools (which is built from minibox), it takes 26 seconds to run the entire action: https://github.com/foundeo/cfml-ci-examples/actions/runs/3474052598/jobs/5806778999
👍🏾 1
d
Do you have an article explaining what minibox is - how it compares to commandbox?
f
it is commandbox, but it is using box lite, which is using lucee lite
so that means some lucee extensions are not there by default
then it is just a bunch of things that pack it down as small as possible
it’s not crazily complicated — this is the entire thing in ~80 lines: https://github.com/foundeo/minibox/blob/master/Dockerfile
d
I do dev on neovim PDE for lots of other projects and for cfml I’d like to add some cfformat and cflint. But current commandbox startup is 8 seconds
The DX is not good
If I could minibox for those commands and startup time is under 1 second well let’s do it
f
yeah not sure if it will be faster, since I’m not sure waht neovim PDE is… if you are comparing pulling/running a commandbox docker image vs a minibox docker image, then minibox should be faster, but if you are comparing a
box.exe
vs docker run
docker run -it --rm foundeo/minibox:latest box
then I don’t think it will be much faster
d
I was thinking I'd start the container if not already started, then
docker exec container-name box fmt $[input_file}
anytime I want to. Feasible right?
just tired it. The box command inside minibox is slower than my host machine with commandbox.
b
@Daniel Mejia Minibox usually takes 5-10 seconds to run box depending on your hardware. As a general rule, running a binary inside of a docker container will always be slower than running the binary directly outside of docker!
I was thinking I'd start the container if not already started, then
docker exec container-name box fmt $[input_file}
anytime I want to. Feasible right?
This doesn't make any sense. The overhead is the startup of
box
, not the container itself so there's no value in having the container running first.
d
yeah I found the path for the binary for box lite. I'm gonna try that next
b
Lite doesn't start up that much faster in my experience
d
ok
b
Now, what would be interesting would be to run a task daemon with a Rabbit RPC server in it which ran commands and "talk" to it via a Rabbit RPC client
d
so the daemon would start up one time and "talking" to it via the rpc client would be instant?
b
Yeah
d
the commandbox sytem tray tool talks to commandbox via what kind of client?
b
None
The system tray is literally just running inside the JVM process 🙂
It's not a separate process
It also doesn't talk to CommandBox per se, it just talks to the running server (runwar)
Menu items such as
restart
just run
box server restart
and spin up a box instance
d
so how would the Rabbit RPC client talk to the box instance?
b
Magic 🙂
Via a RabbitMQ Server