Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295434

Resource (entity) normalization should use partial caching

$
0
0

Problem/Motivation

When normalizing collection requests we should be able to leverage the cached data from the normalization of the individual entities.

Proposed resolution

If a resource (entity) has been already normalized in the past, then reuse it during the normalization process. Incrementally expand the cache entry for a resource (an entity), just like Render Cache already does (see #16).

See a more detailed explanation of the performance improvements in #108. This is a summary.

ScenarioResp (avrg)Resp (max)Resp (min)
No Cache459 ms817 ms436 ms
With Cache191 ms925 ms174 ms

Remaining tasks

None.

User interface changes

N/A

API changes

None.

Data model changes

None.

Release notes snippet

JSON:API now caches resource (entity) normalizations, resulting in a typical 2⨉ speed-up. The improved performance is especially noticeable on responses with many resources (entities), typically when using lots of includes. Notably, using different combinations of sparse fieldsets does not cause different cache entries; all requests for the same resource uses the same cache entry, regardless of the sparse fieldset requested.


Viewing all articles
Browse latest Browse all 295434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>