- Issue created by @longwave
- Status changed to Needs review
9 months ago 9:29pm 27 March 2024 - Merge request !7214Lazily instantiate ajax_response.attachments_processor. β (Open) created by longwave
- First commit to issue fork.
- Status changed to RTBC
9 months ago 5:11pm 28 March 2024 - πΊπΈUnited States smustgrave
Only rebased to get the tests to run again since I couldn't run manually. The failure before was random and related to migration not connecting to the database.
All green now.
Refactor seems fine using the autowire, comparing to other instances in core of how it was used.
- Status changed to Needs work
9 months ago 12:42am 29 March 2024 - π¬π§United Kingdom alexpott πͺπΊπ
We have a couple of modules this is going to break. See https://git.drupalcode.org/search?group_id=2&repository_ref=&scope=blobs...
I think we should use the DeprecatedServicePropertyTrait to provide a way for anything that extends the class to access the old property and get a deprecation notice.
- Status changed to Needs review
9 months ago 9:02am 29 March 2024 - π¬π§United Kingdom longwave UK
Added DeprecatedServicePropertyTrait, not sure it's worth adding a test.
> \Drupal::service('ajax_response.subscriber')->ajaxResponseAttachmentsProcessor; = Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor {#10035}
- Status changed to RTBC
9 months ago 3:54pm 30 March 2024 - πΊπΈUnited States smustgrave
Will lean on your committer hat if tests would be needed.
- Status changed to Fixed
9 months ago 5:08pm 30 March 2024 - π¬π§United Kingdom alexpott πͺπΊπ
-
alexpott β
committed 17b48823 on 10.3.x
Issue #3436468 by longwave, smustgrave, alexpott: AjaxResponseSubscriber...
-
alexpott β
committed 17b48823 on 10.3.x
-
alexpott β
committed 5833d313 on 11.x
Issue #3436468 by longwave, smustgrave, alexpott: AjaxResponseSubscriber...
-
alexpott β
committed 5833d313 on 11.x
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Thanks for the excellent issue summary, @longwave! Unless I'm mistaken, this means you've just made all non-HTML responses faster, because those would not use the attachments processor service. IOW: this must've made all JSON:API and REST responses slightly faster? (And presumably GraphQL too.)
- π¬π§United Kingdom longwave UK
It's all non-Ajax responses that are theoretically faster, because the processor is only needed if the response object is an
AjaxResponse
. But I'm not sure it's measurably faster, as object construction in PHP is relatively fast anyway, and a lot of those services are still needed on many requests, just later on in the request cycle. But if it saves a few nanoseconds here and there then it all adds up eventually! Automatically closed - issue fixed for 2 weeks with no activity.