Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #56636


Ignore:
Timestamp:
09/23/2022 08:56:06 AM (3 years ago)
Author:
aristath
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56636

    • Property Keywords has-patch added
    • Property Summary changed from Performance: duplicate use of realpath() to Bug/performance: duplicate use of realpath()
  • Ticket #56636 – Description

    initial v3  
    11While 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`.
     2After 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`.
    33
    44This is a simple bugfix and saves some performance. More details and screenshots in the PR