﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
23132	wp_timezone_override_offset() has noticeable performance hit	Rarst		"While wandering through XHProf generated callgraph of my test stack I came upon `wp_timezone_override_offset()` eating 3.4% of runtime (73 calls). I do not expect noticeable resource consumption from such minor configuration-related function.

The obvious performance aspect is that it creates and discards two objects (`DateTime` and `DateTimeZone` - latter seemingly more heavy) per each call, while calculating same result each run.

The less obvious aspect is that the only use of this function is to pre-filter `gmt_offset` option, and it essentially hijacks option cache for it.

Possible solutions:

 - calculate result once per run and cache in static variable inside function (straightforward, but retains multiple function call)
 - filter `gmt_offset` on set rather than get (more involved)
 - scrap the extra function and/or option altogether? is there still practical need for having two options for timezone information?"	enhancement	new	normal	3.6	Date/Time	3.5	minor		has-patch	contact@… Otto42 tom@…
