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

WordPress Trac noreply at wordpress.org
Sun Oct 4 19:36:12 UTC 2015


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

Comment (by wpweaver):

 My apologies. I have overreacted, but this is an important.

 If you had acknowledged that you all understood the exponential time issue
 at some point, it would have helped. Instead all I heard was I use too
 many options, which has nothing to do with the issue.

 And the algorithm used for adding the setting  filters, while quite
 elegant code-wise, is one of the very best examples I've ever seen of a
 bad algorithm with significant consequences for many many people. I would
 guess that it has cost countless hours of time spent waiting for the
 refresh. It would make a nice classroom discussion for new CS students
 that even these days, you need to think about execution time.

 With the highly appreciated helpful note from you on the other ticket, I
 have successfully implemented a subclass to solve the issue for me, at
 least fairly well. The sanitize problem may still be there, but the
 refresh is under 10 seconds, which is at least fairly usable.

 If you want to see my implementation of the option (or theme mod) filter,
 I'd be happy to provide it as I think it can be generalized to solve the
 exponential time issue. It uses a class static variable to hold instances
 of the settings, and a static class function to implement the filter. I
 don't use the multidimension stuff to reset the values because my settings
 don't have arrays of arrays, but it could be used. And it only needs to be
 applied to preview - all the rest work okay unchanged.

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


More information about the wp-trac mailing list