Problem/Motivation

Scenario: Clear views cache.

Clearing cache I noticed a lot of function calls to views_include() and intern to ctools_include() which stores an internal static with require_once for performance.

require_once is a bit slower than include_once and this is an unnecessary layer of abstraction.

Proposed resolution

Replace and deprecate views_include() with include_once()

Helps with performance (see screenshot) and unnecessary abstraction (IMO).

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

StatusFileSize
new489 bytes

Here's the patch.

joelpittet’s picture

Saved me about 8 ms on a different site.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

It helps.

joseph.olstad’s picture

Issue tags: +minor version target

joelpittet has done some great work here. Adding the 'minor version target' tag.
Please include this for 7.x-3.17

joseph.olstad’s picture

These other performance fixes all play nice together. I recommend all of them for 7.x-3.17 please and thanks.

dsutter’s picture

RTBC+ patch #2

gdaw’s picture

Performance boost confirmed.

RTBC for patch #2

damienmckenna’s picture

joseph.olstad’s picture

Looks good for 3.19! I assume this is comming soon?

damienmckenna’s picture

Slowly..

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks again.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.