#56758 closed defect (bug) (fixed)
Performance: Avoid extra calls to realpath
| Reported by: | aristath | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.1 |
| Component: | General | Version: | 6.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | performance |
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.
4 years ago
#1
- Keywords has-patch added
SergeyBiryukov commented on PR #3416:
4 years ago
#5
Thanks for the PR! Merged in r54415.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/56758