I was running some profiling on CPU usage and ran into something that slows down every page considerably that was fixed in 4.1. In func.php function func_display find these lines and delete them:
PHP Code:
if (empty($templater->strict_resources) && ($r=func_bf_psc('r', 'asc'))!==false) {
$templater->strict_resources[] = $r;
}
These lines were deleted in 4.1.x so I'm pretty sure the change is safe. They seem to have something to do with getting a list of templates that should always be compiled, even if the compiled version already exists in templates_c.
I'm running this now and it doesn't cause any problems, but the performance improvement is dramatic.
NOTE: I have checked the upgrade packages and this fix applies only to 4.0.14 through 4.0.19.