I'm running a typical Laravel version 5.2.23 on Homestead Vagrant box on Win10 with a fast NVMe ssd, Skylake i7 6700K cpu, 16GB ram. VirtualBox 5.0.26 r108824. I have 4GB and 2 CPU's allocated to the VM. Pretty much everything is default.
This very basic user table seeder takes 45 seconds for 1000 records and I had faster performance with a much slower pc before with Laravel 4.2. When I hit the localhost site it loads fast with data ( I simply echo the entire 1000 record user table in index.html ) so it doesn't seem like a network traffic slowdown between the VM and Win10, but idk.
Seeder is below.
class UsersTableSeeder extends Seeder {
public function run() {
DB::table('users')->truncate();
for( $ii = 0; $ii < 1000; $ii++)
DB::table('users')->insert([
'name' => $ii,
'email' => $ii.'@gmail.com',
'password' => bcrypt('secret'),
]);
}
}
I know sometimes there can be weird Windows file system slowdowns with Linux based VM's, but I'm not sure whats going on here. Any help would be great.