[wp-trac] [WordPress Trac] #5346: Cache current theme in options
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 12 22:54:54 GMT 2007
#5346: Cache current theme in options
---------------------+------------------------------------------------------
Reporter: ryan | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.4
Component: General | Version:
Severity: normal | Keywords: performances themes
---------------------+------------------------------------------------------
get_theme_mod() calls get_current_theme() which in turn calls
get_themes(). get_themes() scans and parses all themes. This means that
themes that call get_theme_mod() scan and parse all themes on every page
load. This includes themes that use the custom image header library.
Profiling on my testbed revealed that 10% of the load time for the front
page was due to get_theme_mod() and friends. Saving the current theme in
options eliminates the need to rescan themes on every load.
--
Ticket URL: <http://trac.wordpress.org/ticket/5346>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list