[wp-trac] [WordPress Trac] #32103: Multidimensional Customizer settings (options & theme mods) are not scalable

WordPress Trac noreply at wordpress.org
Mon Oct 5 00:47:14 UTC 2015


#32103: Multidimensional Customizer settings (options & theme mods) are not
scalable
--------------------------+--------------------------
 Reporter:  Air.          |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.4
Component:  Customize     |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  performance
--------------------------+--------------------------
Changes (by westonruter):

 * keywords:  has-patch needs-testing reporter-feedback => needs-patch


Comment:

 I scripted a test to see how the load time grows as the number of multi-
 dimensional settings grows. I identified two boolean options that impact
 the preview time: whether or not the multidimensional setting had
 previously been added as an option, and whether or not the setting's value
 is dirty (changed, and thus needing to previewed).

 From my analysis, I can see that [attachment:32103.diff] only fixes the
 performance problems when the option is already added (e.g. `add_option()`
 was used during plugin/theme activation), and the settings are not dirty.

 In the three other scenarios, the time to load the preview grows
 exponentially as the number of multidimensional settings are increased,
 just as in `trunk` without the patch.

 Data with graphs on the performance:
 https://docs.google.com/spreadsheets/d/1cu5rvevr7VKgeooek9LD3J1ZD9VLTlGm-
 MtoppdJ78k/edit#gid=1830051232

 Data obtained via scripts in this Gist:
 https://gist.github.com/westonruter/b4640cbf4d71bc84933f

 So I do see that the original approach I was taking in
 [attachment:32103.wip.diff] is going to be needed, where it stores the
 root value of multidimensional settings in a static array, and this static
 variable is then accessed and mutated when performing the `value`,
 `preview`, and `update` operations.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32103#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list