Slowness on Wireguard configuration pages when large number of peers are present
-
Hello,
I'm affected by this bug: https://redmine.pfsense.org/issues/13405As I wrote on the bugtracking page I took a look at the code and I see that the slowness is due to the line
$config = parse_config(true);
which is called every time a wireguard config page is opened.Right now I have 300 peers and wireguard page took more than 60 seconds to load, if I comment out
$config = parse_config(true);
the load time is instantaneous and everything seems to work fine.I'm writing here hoping some developer can optimize this code because I think commenting out the line as I did in my test doesn't seem the best solution, I think the configuration should be parsed only when actually needed and not on every page load
-