#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
@
9 years ago
- Cc espellcaste@… added
Me too!
And you are right, never heard of BP_IGNORE_DEPRECATED. :(
#3
@
9 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
@
9 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.
#7
@
8 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.
This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.
8 years ago
#10
@
8 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.
I like.