Changeset 287837 in webkit


Ignore:
Timestamp:
Jan 10, 2022, 9:09:17 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds
https://bugs.webkit.org/show_bug.cgi?id=234941

Patch by Elliott Williams <Elliott Williams> on 2022-01-10
Reviewed by Jonathan Bedard.

Source/JavaScriptCore:

On builds made with the legacy build system (currently any CLI build for Apple platforms),
postprocess-headers.sh always runs, even when no headers have been copied. PBXBuild doesn't
have the necessary granularity to let us avoid running it when there are no headers to copy,
however, this patch improves execution time by only running the postprocess rule when a
header has changed since the last time it ran.

This change reduces JavaScriptCore's null build time from ~18.3s to ~5.32s.

  • postprocess-headers.sh: Added timestamp check

Source/WebKitLegacy/mac:

  • postprocess-headers.sh:
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r287829 r287837  
     12022-01-10  Elliott Williams  <emw@apple.com>
     2
     3        postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds
     4        https://bugs.webkit.org/show_bug.cgi?id=234941
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        On builds made with the legacy build system (currently any CLI build for Apple platforms),
     9        postprocess-headers.sh always runs, even when no headers have been copied. PBXBuild doesn't
     10        have the necessary granularity to let us avoid running it when there are no headers to copy,
     11        however, this patch improves execution time by only running the postprocess rule when a
     12        header has changed since the last time it ran.
     13
     14        This change reduces JavaScriptCore's null build time from ~18.3s to ~5.32s.
     15
     16        * postprocess-headers.sh: Added timestamp check
     17
    1182022-01-09  Sam Weinig  <weinig@apple.com>
    219
  • trunk/Source/JavaScriptCore/postprocess-headers.sh

    r270315 r287837  
    2727POSTPROCESS_HEADER_RULE="${SRCROOT}/Scripts/postprocess-header-rule"
    2828[[ -x "${POSTPROCESS_HEADER_RULE}" ]] || { echo "### Unable to find ${POSTPROCESS_HEADER_RULE}"; exit 1; }
     29TIMESTAMP="${TARGET_TEMP_DIR}/postprocess-headers-timestamp"
    2930
    3031function rewrite_headers ()
    3132{
    3233    for HEADER_PATH in "${1}/"*.h; do
     34        [ "${TIMESTAMP}" -nt "${HEADER_PATH}" ] || \
    3335        SCRIPT_HEADER_VISIBILITY="${2}" \
    3436        SCRIPT_INPUT_FILE="${HEADER_PATH}" \
     
    4042rewrite_headers "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}" Public
    4143rewrite_headers "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}" Private
     44touch "${TIMESTAMP}"
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r287770 r287837  
     12022-01-10  Elliott Williams  <emw@apple.com>
     2
     3        postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds
     4        https://bugs.webkit.org/show_bug.cgi?id=234941
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * postprocess-headers.sh:
     9
    1102022-01-07  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Source/WebKitLegacy/mac/postprocess-headers.sh

    r270693 r287837  
    2727POSTPROCESS_HEADER_RULE="${SRCROOT}/scripts/postprocess-header-rule"
    2828[[ -x "${POSTPROCESS_HEADER_RULE}" ]] || { echo "### Unable to find ${POSTPROCESS_HEADER_RULE}"; exit 1; }
     29TIMESTAMP="${TARGET_TEMP_DIR}/postprocess-headers-timestamp"
    2930
    3031function rewrite_headers ()
     
    3940
    4041rewrite_headers "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}" Private
     42touch "${TIMESTAMP}"
Note: See TracChangeset for help on using the changeset viewer.