From 4bf6c1ab8e84d2e83ddc57d98df716c5e061f02e Mon Sep 17 00:00:00 2001 From: 8chan Date: Wed, 19 Nov 2014 00:50:05 -0800 Subject: [PATCH] Performance enhancement with eval --- inc/8chan-mod-pages.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index 6e792572..6b7f97b8 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -412,7 +412,9 @@ EOT; $_config = $config; - openBoard($b); + // Faster than openBoard and bypasses cache...we're trusting the PHP output + // to be safe enough to run with every request, we can eval it here. + eval(preg_replace('/^\<\?php$/m', '', $config_file)); // be smarter about rebuilds...only some changes really require us to rebuild all threads if ($_config['captcha']['enabled'] != $config['captcha']['enabled']