New "lightning" version is super slow on Windows due to DNS delay

I’m on Windows 10 and just upgraded to 5.5.3. Unfortunately the first page load after any change - css, js, html - takes about 5-10 seconds to load. Crazy annoying when I’m making small css tweaks (even my preprocessor dynamic css injection was slowed down the same amount).

I followed another post on here about Windows 10 performance to no avail. I switched to Apache with no improvement.

However using developer tools in Firefox I was able to determine that it was due to slow DNS resolution. When I switched off custom domains and started using localhost, everything is now lightning fast!

Is there a way to get the new version just as fast with custom domains in Windows 10?

Hi @MikeBman,

Sorry for the slowdown!

Nothing regarding DNS or the hosts file has changed in recent Lightning releases. Lightning also has a specific IPv6 loopback entry in the /etc/hosts file that should help with the IPv6 DNS but it doesn’t cover all cases.

With that said, I’d recommend checking your PC’s and networks IPv6 DNS settings or maybe even try disabling IPv6 in general and see if that helps.

Hi @MikeBman, I ran into the same problem and found a solution

  1. edited the scripts to point all to win64 rather than win32x64

inside \php-7.4.1+8\lib\PhpService.js
[LocalMain.LightningServicePlatform.Win32x64]: {
‘php’: path_1.default.join(this.$PATHs[LocalMain.LightningServicePlatform.Win64], ‘php.exe’),
‘phpCgi’: path_1.default.join(this.$PATHs[LocalMain.LightningServicePlatform.Win64], ‘php-cgi.exe’),

  1. added local to the exclusion list on Windows defender

Still I am working on catching a SSL bug but that is a different battle, local works fine now


Hi @clay,

I found some stuff that I am not sure if that was meant to be there, some win32x64, I changed and it seems to work.
also for windows 10 the app and the sites shall be excluded (MS AV is slow by nature)

I have one SSL question for you is about the Trust mechanism not working.
local is showing this message

Warning: PHP Startup: Unable to load dynamic library ‘php_imagick.dll’
(tried: C:/Users/luisg/AppData/Roaming/Local/lightning-services/php-7.4.1+8/bin/win64/ext\php_imagick.dll

I know the extension is there C:\Users\luisg\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-7.4.1+8\bin\win64\ext\php_imagick.dll

but what I could not find is where there is a back slash before the extension when all the previous are forward slash

Looking forward to find a solution to fix the Trust Mechanism



Do you remember what specifically you changed here? I highly recommend shying away from this particular change as it will likely introduce issues going forward. If there is an issue we’ll be happy to patch it up.

Agreed! We may build in a UI suggestion for this at some point but it does come at a cost of reduced security, unfortunately.

Can you provide a screenshot of what you’re seeing here? We did just fix an issue with the Trust button not working in Local 5.6.1.

Lastly, @hpsc added some great Windows speed tips here (one of which includes adding the AV exclusions): Optimizing Local "Lightning" performance on Windows 10 - Workflow - Local Community

Hi @clay,

Thanks for your reply.
I am running Local V 5.5.3+3667 NOT 5.6.1
PHP 7.4.1 64 bits

What I have changed is: PhpService.js and the reson behind is two extensions didn’t load so I found that strange reference to a directory win32x64 and I only found win32 and win64, hence the change.

php info seems to be happy,

not sure why node still having problems to find php_imagick.dll

I’m happy to work on a fix for this error C:\Users\luisg\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-7.4.1+8\bin\win64\ext/php_imagick.dll

In relation to the speed and security, I added Local and its sites (the complete environment) to the list of excluded folders in Windows Defender and the speed is good now, don’t see why it could be a security concern given the fact that the software is original.

If there is a version 5.6.1 I can try it and provide feedback.

My environment is Win10 Pro 64bits

Happy to help.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.