I’m trying out a theme for a WooCommerce shop and I’m noticing a 5s TTFB lag on any request. Be it regular or AJAX, everything is snail-paced because of this up-front delay.
I tried a different site and that one, while slimmer, seems to move fine. So I’ve ruled out the hardware (i5 Thinkpad), firewall or browser (tried in Chrome and Firefox). The lag is quite constant and happens when using the site or the admin. Accessing Adminer is unaffected. I can’t remember a moment when it got this way, seems like it’s always been this way on this local site.
The domain I’ve chosen is the actual future domain, mysite.tld instead of mysite.local I checked Local’s entries in the Windows hosts file and they’re correct
## Local by Flywheel - Start ##
192.168.94.100 mysite.tld #Local Site
192.168.94.100 www.mysite.tld #Local Site
## Local by Flywheel - End ##
I’ve installed Query Monitor following a recommendation in another thread here but it doesn’t seem to show anything out of the ordinary. I can’t get db.php symlinked on Windows, tried to hardlink with mklink -h but that fails too.
The weird symptom is that you’d expect variable delay – tiny operations taking less time compared to more intensive operations. But when that first byte actually arrives the site’s speed seems fairly OK.
Please help point me in some direction here. Cheers!
Have you tried using Local 5 or newer (see https://localbyflywheel.com/community/c/releases for the latest release)? There are significant performance improvements thanks to the new Local Lightning architecture.
Thanks for the reply! I tried Local Lightning 5.0.7 beta but on importing my slow site from a .zip I ran into this error:
Error: Command failed: C:\Program Files (x86)\Local\resources\extraResources\site-binaries-win32\mysql-8.0.16\bin\mysql.exe --default-character-set=utf8 -A --skip-column-names -e SET names 'utf8'; use local; source D:/Online/Direct/mysite-test/app/sql/local-schema-create.sql;
ERROR 1007 (HY000) at line 1 in file: 'D:\Online\Direct\mysite-test\app\sql\local-schema-create.sql': Can't create database 'local'; database exists
I got all excited about the capability of trying Local Lightning alongside Local by Flywheel (v3). But another thread mentioning the “database exists” error says to uninstall the old version, and that I won’t do at the moment as I absolutely need it to work for a few more days.
Then when trying to init a new project from scratch it stopped at
I’m pretty confident the theme and required plugins were the problem. Too much bloat. Haven’t been able to figure out where the slowdown is coming from, but I deployed and the excellent host runs the site a little faster than Local on my dev machine. Will try to get help from the theme authors (XTemos) but most likely there is no one single bottleneck, just bloat.