You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using next-drupal 1.x but I've opted not to leverage the sub-requests module. The primary reason for this is to opt for cache performance (subrequests uses POST which isn't cacheable) over a lower frequency of requests (subrequests reduce total number of requests although it doesn't reduce net badwidth).
I'd like to use Drupal's External Entities modules but that conflicts with Subrequests - a module I'm not using but is present and enabled in my codebase because the Next module requires it.
Describe the solution you'd like
Remove Subrequests as a required module. Perhaps move it to a composer suggested module. I'd argue that the performance given by this module in request reduction is a negative performance optimization as it stops you from leveraging application caching in Drupal, platform caching (e.g. Varnish), CDN caching and Next.js static caching (virtually all layers).
The text was updated successfully, but these errors were encountered:
I’ve been thinking about this issue and doing some research. Next.js will cache POST requests, so if you are using Vercel’s env, that’s not an issue per se. However, Varnish doesn’t cache POST by default. It also won’t cache subrequest responses because they are HTTP 207 Multi-Part Status. If you can reconfigure Varnish, that’s not an issue, but if you can’t, then 2 separate GET requests will be more performant because they can be cached.
I agree that subrequests should be an optional module, not a required one.
I think we should add a useSubrequests option to next-drupal that defaults to false that can be enabled if the Drupal site uses that module.
I've put my work-in-progress into a Git branch called 744-make-subrequests-optional. It currently includes the code changes needed for the next-drupal JS package without any needed test changes. And I haven't yet looked at the changes needed in the Drupal modules.
BREAKING CHANGE:
The subrequests Drupal module is not optional and next-drupal will now only
perform JSON:API subrequests when the useSubrequests flag is enabled.
Fixes#744
BREAKING CHANGE:
The subrequests Drupal module is not optional and next-drupal will now only
perform JSON:API subrequests when the useSubrequests flag is enabled.
Fixes#744
Package
next (Drupal module)
Describe the feature request
I'm using next-drupal 1.x but I've opted not to leverage the sub-requests module. The primary reason for this is to opt for cache performance (subrequests uses POST which isn't cacheable) over a lower frequency of requests (subrequests reduce total number of requests although it doesn't reduce net badwidth).
I'd like to use Drupal's External Entities modules but that conflicts with Subrequests - a module I'm not using but is present and enabled in my codebase because the Next module requires it.
Describe the solution you'd like
Remove Subrequests as a required module. Perhaps move it to a composer suggested module. I'd argue that the performance given by this module in request reduction is a negative performance optimization as it stops you from leveraging application caching in Drupal, platform caching (e.g. Varnish), CDN caching and Next.js static caching (virtually all layers).
The text was updated successfully, but these errors were encountered: