[buddypress-trac] [BuddyPress Trac] #7218: Only load component action and screen code when we're on the component's page

buddypress-trac noreply at wordpress.org
Wed Jun 14 17:33:25 UTC 2017


#7218: Only load component action and screen code when we're on the component's
page
-------------------------+-----------------------
 Reporter:  r-a-y        |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  2.9
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------

Comment (by r-a-y):

 A few dev chats ago, we talked about moving the screen and action code to
 classes so we can utilize class autoloading.

 I've done this for the Activity and Groups components in the `groups-
 autoload.patch` and `activity-autoload.patch` patches.

 The result is the filesize for `bp-activity-actions.php` and `bp-activity-
 screens.php` is now only 6KB individually, instead of 28KB and 16KB
 respectively.

 The filesize for `bp-groups-actions.php` and `bp-groups-screens.php` is
 now only 7KB and 10KB respectively, instead of 28KB and 16KB.

 The `activity-autoload.patch` also requires `late-includes.patch` due to
 offshoring the activity RSS feed code until we are on an actual `feed`
 page.

 Existing unit tests pass.  Let me know what you think.

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


More information about the buddypress-trac mailing list