Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#6839 closed enhancement (fixed)

Loading stuff deprecated in BP 1.2 is probably overkill by now

Reported by: DJPaul Owned by: DJPaul
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: (not sure) Keywords:
Cc: espellcaste@…

Description

We load bp-core/deprecated/ all the time unless BP_IGNORE_DEPRECATED is set (which it never really is, because who knows about it?), and this means we're loading significant amounts of old code. I'm adding to it in BP 2.5 with email changes, and that introduces about 800 lines of backpat which will run through a filter every time an email is sent.

On the other hand, I don't want to break people running old plugins past their sell-by dates.
I'd like to suggest that, like other areas of BP:

  • If the site is a new install (not an upgrade from a previous version), we DO NOT load the deprecated files.
  • If the site is an upgrade, we DO load the deprecated files.

This gives slight improvement to new sites, while not breaking old sites. And avoids any long political discussions about how long we want to maintain support for these things (that's worth having, to be clear, but not to hold up this suggestion if we like it).

Change History (12)

#2 @espellcaste
4 years ago

  • Cc espellcaste@… added

Me too!

And you are right, never heard of BP_IGNORE_DEPRECATED. :(

#3 @DJPaul
4 years ago

I have mis-remembered how we detected upgrades vs new installs. For this, we'll probably need to set an option, like we did for BP-Default in bp_do_register_theme_directory().

#4 @DJPaul
4 years ago

  • Milestone changed from Awaiting Review to 2.6

I can't do this for 2.5, so i'll do it in 2.6 unless someone wants to do it now. Would fit in nicely with the class auto-loading work Boone has done under the theme of memory footprint improvements.

#5 @DJPaul
4 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

#6 @DJPaul
3 years ago

  • Milestone changed from 2.6 to Future Release

#7 @DJPaul
3 years ago

  • Milestone changed from Future Release to 2.7

Started looking at this again, ran into some issues described in #6839, but I want to get this done. It'll tie nicely into the theme of performance improvements that the activity caching changes have introduced.

#8 @DJPaul
3 years ago

I meant #7227 above

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


3 years ago

#10 @DJPaul
3 years ago

Did some naive benchmarking locally. With all components enabled, I think this would decrease BuddyPress' memory usage by at least 1.35% (about 900Kb) on my local site I tested on. This was testing hitting the home page, i.e. not a BuddyPress specific screen.

#11 @djpaul
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 11105:

Core: stop loading deprecated code files for new installs from 2.7 onwards.

Existing installs will continue to load the deprecated code.

Fixes #6839

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.