#56758 closed defect (bug) (fixed)
Performance: Avoid extra calls to realpath
Reported by: | aristath | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | General | Keywords: | has-patch |
Focuses: | performance | Cc: |
Description
The register_block_style_handle
function sets a variable with this code: $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) );
That value never changes, so we can convert that var to be a static variable. By doing so, we can avoid ~200 calls to realpath
and wp_normalize_path
(more if 3rd-party plugins register styles)
Change History (5)
This ticket was mentioned in PR #3416 on WordPress/wordpress-develop by aristath.
2 years ago
#1
- Keywords has-patch added
SergeyBiryukov commented on PR #3416:
2 years ago
#5
Thanks for the PR! Merged in r54415.
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/56758