JSON:API in Drupal 8.8, up to 3x faster
Upcoming version 8.8 of Drupal will see its JSON API fly!
Jibran Ijaz, senior Drupal developer and contributor, recently announced that the performance of Drupal’s JSON:API was significantly improved: up to 3x faster in upcoming version 8.8, compared to version 8.7.
This outstanding achievement results from the resolution of 3 issues:
- Include paths are resolved for every resource in a resource collection;
- Resource normalization is not leveraged and shared;
- ResourceType value objects are computed on every requests.
Those 3 issues take their origin in a very common situation: computed resources were not factored enough, leading to a waste of computing time, method calls overhead, and energy.
When optimizing code performance, it is key to measure each code iteration in order to validate changes. Blackfire’s stable overhead (which never impacts end-users) and its unique profile comparison feature enabled the Drupal team to acknowledge a 79% wall-time (complete PHP execution time) performance increase:
Kudos to the Drupal team 👏!