[wp-trac] [WordPress Trac] #42441: Disable autoload for large options

WordPress Trac noreply at wordpress.org
Mon Nov 6 02:20:51 UTC 2017


#42441: Disable autoload for large options
--------------------------------+-----------------------------
 Reporter:  markjaquith         |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:
 Severity:  normal              |   Keywords:
  Focuses:  performance         |
--------------------------------+-----------------------------
 A frequent issue I encounter with WordPress sites is extreme slowdown due
 to a huge option that is being autoloaded. Sometimes this is some sort of
 cache option that a careless plugin has let be autoloaded, and has grown
 to tens of megabytes.

 Having an option this large be autoloaded not only slows downs the options
 loading query (when that option may not be required on every load), but on
 sites with object caching, it causes a lot of wear and tear on the
 alloptions cache. Combine a large option with a frequently updated option
 and you have a recipe for a very sluggish site.

 We should consider preventing options from being autoloaded if they grow
 to a certain size. Off the top of my head, 100kb sounds like a reasonable
 upper bounds. We could monitor option settings/updates and peek at the
 size of the option going in. If it's above a certain (filterable) bounds,
 we can force autoload to be off.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42441>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list