Opened 9 years ago
Closed 8 years ago
#6976 closed enhancement (fixed)
bp_core_print_generation_time() should echo only in WP_DEBUG mode
Reported by: | slaFFik | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | 1.0 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
Currently bp_core_print_generation_time()
prints info like this:
<!-- Generated in 0,608 seconds. (103 q) -->
on every page load.
I believe, that's quite sensitive information, and should NOT be printed in normal mode.
WP_DEBUG
is more appropriate situation.
Also, I think we need to increase the $priority
to something like 9999 or bigger, as wp_footer
is rather popular action.
Attachments (1)
Change History (12)
#2
@
9 years ago
There IS a difference in data, when we have 9999 priority (both in queries and seconds). Between 10 and 9999 - 8 queries, 10 and 99999 - 10 queries.
And I do want to preserve it :) So can I submit a patch that will preserve it and display in DEBUG mode only?
This ticket was mentioned in Slack in #buddypress by boone. View the logs.
9 years ago
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
9 years ago
#8
@
8 years ago
Let's decide in dev chat whether to keep this with slaFFik's patch or just remove it entirely (my preference).
#9
@
8 years ago
- Owner changed from slaFFik to boonebgorges
- Status changed from assigned to accepted
Let's decide in dev chat whether to keep this with slaFFik's patch or just remove it entirely (my preference).
Let's just decide now. Out it goes :)
@slaFFik - I can see why it'd be useful to have data during WP_DEBUG
, but a BP core function doesn't seem like the appropriate place. A proper debugging tool should be used. May I suggest https://wordpress.org/plugins/query-monitor/ ?
#10
@
8 years ago
And Debug Bar displays that info too (with SAVEQUERIES defined). This small comment with sec and q was used by me for 7 years, it's like an old good friend :)
But I totally understand Paul's and your idea. So just remove it completely. Perhaps this will save some CPU for servers out there :)
Nah, let's just kill it. It's so old it was probably used as a way of measuring performance during initial development.