Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

spaceemotion's avatar

Long boot-time with Homestead in Laravel 5

I'm currently making a new laravel-app and use homestead as my local server. However, the application boot time seems really off. Even when I just had a normal, clean Laravel-5 installation it wasn't that much better. I am always between 1-2s for a single site load. Doing a few ajax-requests here and there, it seems like it's taking forever.

This is a Debugbar-Screenshot of my current application: Debugbar

Even 20 database queries only take up to 5ms in total. For my service providers I only used Debugbar, Sentinel, Bugsnag and HashIds - so nothing too mayor. Even when I had Bugsnag turned off the boot-time was almost the same; very slow.

Running artisan optimize and route:cache did not help with the loading time at all (even though I am using a lot of route controllers, which should have slowed things down).

Any ideas? Cheers!

0 likes
8 replies
spaceemotion's avatar

No, I have a mid-2014 MBP with 2,8 Ghz i7. So generally this should be really fast. Normal php sites are taking only 2ms load time maximum (just an empty "hello world"). That's why it's so strange to me…

bashy's avatar

What's your NFS settings in Vagrantfile? Or do you use rsync? Have anything like lookupcache=none in the settings? That slows it down a lot.

spaceemotion's avatar
spaceemotion
OP
Best Answer
Level 3

Okay, I finally fixed this by changing my Homestead.yml to this:

folders:
    - map: ~/Development/Websites
      to: /home/vagrant/www
      type: nfs  <-- This is important

After that, just do a homestead halt, homestead provision and homestead up. That should be it!

If NFS should give you errors, this might be helpful: https://coderwall.com/p/uaohzg/use-nfs-to-speed-up-your-vagrant

2 likes
sitesense's avatar

Vagrant on windows is very slow

Sorry I don't agree. It works darn fine for me and my PC is mediocre (2.8 GHz i5 | 8GB ram).

larryweya's avatar

Switching to NFS got me from ~900ms to ~150ms. Thanks for sharing.

jlmmns's avatar

@spaceemotion Thanks for the type: nfs tip! The long booting time was really bugging me...

Booting time went down from 600ms - 1s (!) to only 60ms - 150ms.
Man, what a relief!

It seems this option is stated in the docs, but it should definitely be more highlighted as to how much it can help speed up your booting time.

Cheers!

1 like

Please or to participate in this conversation.