Closed (fixed)
Project:
JSON:API Extras
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Nov 2018 at 16:41 UTC
Updated:
17 Dec 2018 at 10:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
e0ipsoComment #3
e0ipsoActually, we should avoid any cache service at all and go back to basics. This patch uses a protected property for this matter.
Comment #4
e0ipsoAlso, JSON:API will probably stop using the cache service too.
Comment #6
e0ipsoComment #8
ndobromirov commentedThis can be further seeded up by:
isset() || array_key_exists()so we can spare the function call if we have a valid cache and not a NULL value in there. This is a hot method, so even micro-optimizations will show up.I will pass a patch once I am testing performance in #3017262: Further speed-ups in ConfigurableResourceType::getResourceFieldConfiguration().
Comment #9
e0ipsoFor the untrained eye:
What @ndobromirov is to avoid the
array_key_existscall when possible because it's considered a slow method (although it's still implemented in C).This will have the effect of prepending an
issetcall so we may be doing extra work. This optimization makes sense when the majority of the resource are not disabled. I don't think we can ensure that's the case, right?