[buddypress-trac] [BuddyPress Trac] #7549: Only load AJAX code on AJAX requests

buddypress-trac noreply at wordpress.org
Thu Jun 22 00:15:09 UTC 2017


#7549: Only load AJAX code on AJAX requests
-------------------------+------------------
 Reporter:  r-a-y        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.0
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------

Comment (by sbrajesh):

 Good point.
 The problem is BuddyPress code base is more like a platform(Just like
 WordPress). Third party plugins build components with it without worrying
 about function/class check for every individual identifier. All they have
 to do is check BuddyPress is active and component is enabled.

 Any hard coded optimization for loading functions/classes will have
 immense side effect. All the 3rd party code will need to check and load
 and repeat.

 The solution that will be more useful is to use a proper autoloader(may be
 based on the PSR, modified for wp context) and write a wrapper for
 attaching actions. Decouple action handlers from the code attaching
 actions.

 That way, Only wrappers will be required to load, the Action Handlers can
 be lazy loaded.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7549#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list