Eureka! I found a solution that seems to fix the issue (at least on a Mac, but there’s probably an equivalent for Windows). Brad’s posting the java method was the ticket.
https://thoeni.io/post/macos-sierra-java/
Basically, on a mac, append [your-machine-name].local
to your /etc/hosts local host entries like so:
127.0.0.1 localhost jonclausen-mbp.local
::1 localhost jonclausen-mbp.local
Voila! Start up times go from 25 seconds back down to 3-4
Jon
Eureka! I found a solution that seems to fix the issue (at least on a Mac, but there’s probably an equivalent for Windows). Brad’s posting the java method was the ticket.
https://thoeni.io/post/macos-sierra-java/
Basically, on a mac, append [your-machine-name].local
to your /etc/hosts local host entries like so:
127.0.0.1 localhost jonclausen-mbp.local
::1 localhost jonclausen-mbp.local
Voila! Start up times go from 25 seconds back down to 3-4
Jon
Was going to say, I have a Macbook pro with virtualization software and docker installed, and I have always seen 3-4 seconds for CB startup. I have the .local hosts entry though, so that explains it. Not sure, but I think my vpn software added the .local hosts entry. I don’t remember adding that one.
Nice find, Jon!
Joel
That’s brilliant, Jon! Has reduced my startup time significantly.
It’s now running at about 8 seconds - but I think half of this might be related to CommandBox 3.8.0.
When I did the debug earlier in the thread, I was running 3.7.0, and it went almost instantly from:
Sun Oct 08 09:39:13 BST 2017-206 class lucee.runtime.instrumentation.Agent.getInstrumentation() is not returning a Instrumentation
…to the prompt being available. While I was trying things out, I also upgraded to 3.8.0, and there was then an added ~4 second delay between that line of the debug and the prompt appearing (even before the hosts fix).
After applying the fix, I get to that line in 4 seconds, and it still takes another 4 to show the prompt.
Brad - what changed in 3.8.0 that might be causing this?
Jon - what version are you running to get 3-4 seconds?
Seb
Well, that’s weird. After numerous launches of around 8 seconds, it has now decided to consistently load in 4 seconds.
So please ignore my previous post!
Seb