It turns out @NoTengoBattery is aware of this issue he investigated in October. He kindly referred me to the following web links:
https://forum.openwrt.org/t/optimized-nas-latency-memory-build-for-linksys-ea6350v3-civic/44125/7
And after testing, I found this results when the device uses the "power saving" frequency:
Most recent v0.22 custom build created on 5 December:
https://github.com/NoTengoBattery/openwrt/releases/tag/157e17-v0.22
Minimum CPU frequency set to 448 MHz instead of 48 MHz (OEM firmware sets the CPU at top speed, but that's a bit aggressive)
.....This is an important setting, the governor used by default cannot deal with this because "ping localhost" (or any ping from any client) does not load the CPU enough. This results in ping spikes even with SQM and noticeable with low speed (but low latency) WAN.
As a quick and dirty test based on NoTengoBattery's above findings, I executed these commands on 19.07.0-rc2
# original value: 48000 ie. 48 MHz. New test value 200 MHz
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "200000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo "200000" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo "200000" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
(I did not change the /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor setting)
Ping times via wifi to EA6350 v3 reduced to 1-2 ms. Ping time to www.bbc.co.uk reduced to 9-10 ms ie. normal.
If the router has been 'idle' for a while prior to executing 'ping', the ping times start off really bad though before dropping to 1-2 ms using above 'quick fix' as a test. ie. The quick fix is clearly not optimised.
Pinging 192.168.1.248 with 32 bytes of data:
Reply from 192.168.1.248: bytes=32 time=74ms TTL=64
Reply from 192.168.1.248: bytes=32 time=60ms TTL=64
Reply from 192.168.1.248: bytes=32 time=48ms TTL=64
Reply from 192.168.1.248: bytes=32 time=1ms TTL=64
Reply from 192.168.1.248: bytes=32 time=2ms TTL=64
Reply from 192.168.1.248: bytes=32 time=2ms TTL=64
Reply from 192.168.1.248: bytes=32 time=2ms TTL=64
Reply from 192.168.1.248: bytes=32 time=2ms TTL=64
Update: I installed NoTengoBattery's latest v0.22 'sc' (standard clocked) custom build and configured it as a simple WAP. I used the 'factory' image and flashed from Linksys OEM GUI. All seems OK. pinging EA6350 takes 1-2 ms, instead of 2-4 ms. I observe the very first ping may take longer if the router has been 'idle' for a while - which is the same behaviour when using OEM firmware.
Pinging 192.168.1.247 with 32 bytes of data:
Reply from 192.168.1.247: bytes=32 time=10ms TTL=64
Reply from 192.168.1.247: bytes=32 time=2ms TTL=64
Reply from 192.168.1.247: bytes=32 time=2ms TTL=64
Reply from 192.168.1.247: bytes=32 time=1ms TTL=64
Reply from 192.168.1.247: bytes=32 time=2ms TTL=64