Optimization for elgg_get_plugin_from_id
|Reported by:||srokap||Owned by:|
Description (last modified by ewinslow)
I've noticed that when using multiple plugin settings, good piece of a second is taken by multiple elgg_get_plugin_from_id calls. It seems it's written not efficient to say the least.
We've made some optimization for this function, we fetch all of the plugins data by single call and instantiate objects in lazy manner. Such approach saved us about 20-30 DB calls, and sum of the runtime dropped from 200-300ms to around 10ms.
Patch in attachment.
Change History (8)
Changed 17 months ago by srokap
comment:2 Changed 13 months ago by ewinslow
- Description modified (diff)
- Milestone changed from Needs Review to Near Term Future Release
comment:4 Changed 11 months ago by cash
- Milestone changed from Near Term Future Release to Elgg 1.8.7