Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2015 at 11:07 UTC
Updated:
18 May 2025 at 05:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pwolanin commentedIs there an easy way for Devel to inject a timer?
An alternative - if we start using assert((), the timer call could be wrapped in that.
Comment #2
pwolanin commentedDiscussed with Moshe in person and he was ok with removing this call from the boot code.
Comment #3
ejabrown commentedI'm at the DrupalCon LA sprint and I can work on this issue.
Comment #4
ejabrown commentedComment #5
pwolanin commenteddawehner notes that there is a use statement that cane be removed also
Comment #6
mikeburrelljr commentedAt DC/LA, investigating @pwolanin's request.
Comment #7
arturogarrido commenteduse statement removed
Comment #8
markie commentedUn-assigning per mentor suggestion.
Comment #9
mikeburrelljr commentedRemove use statement.
Comment #13
arturogarrido commentedComment #14
lauriiiChange looks solid and it seems to pass the tests so RTBC for me. Before that we need still change record and beta evaluation.
Comment #15
acrosmanI'll review this as well and create change record node
Comment #16
arturogarrido commentedClarification: Patch #13 is same patch as #7. Reason is #9 patch failed so I resubmitted to trigger test request again for my previous patch.
Attaching interdiff-2474047-4-13.txt
Hiding previous patches.
Comment #17
acrosmanPatch applies cleanly and passes all tests.
Create change record: https://www.drupal.org/node/2489636
Comment #18
acrosmanComment #19
lauriiiIs there known workaround for this? If there is we should include that.
Comment #20
acrosmanAdded link to reference for alternative to change record.
Comment #21
lauriiiSeems to do the thing. Beta evaluation and we are ready to rock!
Comment #22
arturogarrido commentedComment #23
lauriiiLooks good and all the necessary parts are here. Thanks for your great work all!
Comment #24
acrosmanMarked change record as approved.
Comment #26
xjmThis issue is a prioritized change as per https://www.drupal.org/core/beta-changes and its benefits outweigh any disruption. We've confirmed that the change is okay for the affected contrib projects and that a replacement is available. Committed and pushed to 8.0.x. I also published the CR. Thanks!
Comment #27
xjmComment #28
mikey_p commentedI'm not sure this is a good idea. At a minimum, the change record should be updated to note that KernelEvents::REQUEST is MUCH, MUCH later in the request, and could throw off numbers up to 50%.
I added three timers (original boot timer, one in a high priority stack middleware, and one in a normal priority request subscriber) and then logged their output in a KernelEvents::TERMINATE subscriber and here are the difference on a site with a half dozen contrib modules installed:
Front page:
Boot timer: 51.78
Middleware timer: 47.06
Request timer: 25.04
/admin/content
Boot timer: 50.03
Middleware timer: 44.24
Request timer: 21.09
/user/1
Boot timer: 52.76
Middleware timer: 48.01
Request timer: 25.37
/node/add/article
Boot timer: 59.05
Middleware timer: 53.78
Request timer: 28.05
I found this working on the console_logger module for D8, but I'm sure any other module that needs to get accurate response times is going to have problems with this (we're also logging this information to statsd, and now having an accurate timer from initial bootstrap is not possible).
I'm not sure what the best solution is, but at a minimum, we should at least update the change record to suggest using high priority stack middleware as it execute much sooner in the request, or let people know that there is an up to 50% difference in results from using KernelEvents::REQUEST.
Comment #34
mradcliffeRemoving novice tag as it was for the initial patch, not the re-opened status.
Comment #43
quietone commentedAsked about this at DrupalSouth 2021, larowlan suggested adding the needs change record update tag. And then this issue can be closed when that is done.
See #28 for more details about what to add to the change record.
Comment #44
fubarhouse commentedI've made some adjustments to the change record under the Notes header - hopefully this will make sense to somebody with more familiarity with the subject matter.
Comment #45
darvanenThis is a good start:
However, I think we can be much more specific:
But considering the vast variability of systems I think 4.2 is in the too-hard (nigh impossible) basket so I'd go with 4.1
Comment #51
quietone commentedThis was committed