[wp-trac] [WordPress Trac] #48880: Using JSON.parse instead of an actual object literal when localizing scripts

WordPress Trac noreply at wordpress.org
Thu Dec 5 00:57:27 UTC 2019


#48880: Using JSON.parse instead of an actual object literal when localizing
scripts
---------------------------+--------------------------------------
 Reporter:  naxvog         |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  5.3
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  javascript, performance
---------------------------+--------------------------------------

Comment (by swissspidy):

 I'd like to really stress this:

 > A good rule of thumb is to apply this technique for objects of 10 kB or
 larger — but as always with performance advice, measure the actual impact
 before making any changes.

 I doubt this change will make a noticeable difference.

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


More information about the wp-trac mailing list