Description
What were you trying to do?
We built a small app using Laravel 11 with Livewire V3.
What happened?
We noticed all pages took a significant amount of time the first time they're loaded
How to reproduce the bug
After running the build with nativephp and installing it, we opened the Developer tools to observe the page loads. Going through even the default dashboard Jetstream can take upwards of 3 seconds to load. Loading the profile page that comes bundled with jetstream without any modification takes even longer. This only occurs the first time the page loads, subsequence visits only takes < 1 second. The slowdown comes back after windows is restartted.
We also noticed the same slowdown with just Laravel Herd instead of building with nativephp and found a similar issue: beyondcode/herd-community#801 (comment)
The advice on disabling windows defender scanning resolved the performance issue and the nativephp build loads pages near instantly afterwards.
Package Versions
{
"installed": [
{
"name": "nativephp/electron",
"direct-dependency": true,
"homepage": "https://github.com/nativephp/electron",
"source": "https://github.com/NativePHP/electron/tree/0.9.0",
"version": "0.9.0",
"description": "Electron wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/laravel",
"direct-dependency": false,
"homepage": "https://github.com/nativephp/laravel",
"source": "https://github.com/NativePHP/laravel/tree/0.7.0",
"version": "0.7.0",
"description": "Laravel wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/php-bin",
"direct-dependency": false,
"homepage": "https://nativephp.com",
"source": "https://github.com/NativePHP/php-bin/tree/0.5.6",
"version": "0.5.6",
"description": "PHP binaries used by the NativePHP framework",
"abandoned": false
}
]
}
PHP Version
8.4.5
Laravel Version
11.31
Node Version
23
Which operating systems have you seen this occur on?
Windows
OS version
win 11 (24H2) OS Build 26100.3476
Notes
Is there a more optimal solution without requiring users to configure their windows defender exceptions? Did we miss a step during the build?