Changes between Initial Version and Version 3 of Ticket #56636
- Timestamp:
- 09/23/2022 08:56:06 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #56636
- Property Keywords has-patch added
-
Property
Summary
changed from
Performance: duplicate use of realpath()
toBug/performance: duplicate use of realpath()
-
Ticket #56636 – Description
initial v3 1 1 While running Xdebug profiling with webgring in WP-Core, I noticed that `realpath()` is getting called too many times and costs a lot of time. 2 After some examination, I found that the `register_block_style_handle()` function call `realpath` to set a `$style_path_norm` variable, and then a few lines below that, sets a `$style_file` variable with the exact same value, recalculating things and re-running `realpath`.2 After some examination, I found that the `register_block_style_handle()` function calls `realpath` to set a `$style_path_norm` variable, and then a few lines below that, sets a `$style_file` variable with the exact same value, recalculating things and re-running `realpath`. 3 3 4 4 This is a simple bugfix and saves some performance. More details and screenshots in the PR