Title: [287837] trunk/Source
- Revision
- 287837
- Author
- [email protected]
- Date
- 2022-01-10 09:09:17 -0800 (Mon, 10 Jan 2022)
Log 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 <[email protected]> on 2022-01-10
Reviewed by Jonathan Bedard.
Source/_javascript_Core:
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 _javascript_Core's null build time from ~18.3s to ~5.32s.
* postprocess-headers.sh: Added timestamp check
Source/WebKitLegacy/mac:
* postprocess-headers.sh:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (287836 => 287837)
--- trunk/Source/_javascript_Core/ChangeLog 2022-01-10 15:13:54 UTC (rev 287836)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-01-10 17:09:17 UTC (rev 287837)
@@ -1,3 +1,20 @@
+2022-01-10 Elliott Williams <[email protected]>
+
+ postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds
+ https://bugs.webkit.org/show_bug.cgi?id=234941
+
+ Reviewed by Jonathan Bedard.
+
+ 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 _javascript_Core's null build time from ~18.3s to ~5.32s.
+
+ * postprocess-headers.sh: Added timestamp check
+
2022-01-09 Sam Weinig <[email protected]>
Remove support for Direct2D
Modified: trunk/Source/_javascript_Core/postprocess-headers.sh (287836 => 287837)
--- trunk/Source/_javascript_Core/postprocess-headers.sh 2022-01-10 15:13:54 UTC (rev 287836)
+++ trunk/Source/_javascript_Core/postprocess-headers.sh 2022-01-10 17:09:17 UTC (rev 287837)
@@ -26,10 +26,12 @@
POSTPROCESS_HEADER_RULE="${SRCROOT}/Scripts/postprocess-header-rule"
[[ -x "${POSTPROCESS_HEADER_RULE}" ]] || { echo "### Unable to find ${POSTPROCESS_HEADER_RULE}"; exit 1; }
+TIMESTAMP="${TARGET_TEMP_DIR}/postprocess-headers-timestamp"
function rewrite_headers ()
{
for HEADER_PATH in "${1}/"*.h; do
+ [ "${TIMESTAMP}" -nt "${HEADER_PATH}" ] || \
SCRIPT_HEADER_VISIBILITY="${2}" \
SCRIPT_INPUT_FILE="${HEADER_PATH}" \
SCRIPT_OUTPUT_FILE_0="${HEADER_PATH}" \
@@ -39,3 +41,4 @@
rewrite_headers "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}" Public
rewrite_headers "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}" Private
+touch "${TIMESTAMP}"
\ No newline at end of file
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (287836 => 287837)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2022-01-10 15:13:54 UTC (rev 287836)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2022-01-10 17:09:17 UTC (rev 287837)
@@ -1,3 +1,12 @@
+2022-01-10 Elliott Williams <[email protected]>
+
+ postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds
+ https://bugs.webkit.org/show_bug.cgi?id=234941
+
+ Reviewed by Jonathan Bedard.
+
+ * postprocess-headers.sh:
+
2022-01-07 Alex Christensen <[email protected]>
Unreviewed, reverting r287698.
Modified: trunk/Source/WebKitLegacy/mac/postprocess-headers.sh (287836 => 287837)
--- trunk/Source/WebKitLegacy/mac/postprocess-headers.sh 2022-01-10 15:13:54 UTC (rev 287836)
+++ trunk/Source/WebKitLegacy/mac/postprocess-headers.sh 2022-01-10 17:09:17 UTC (rev 287837)
@@ -26,6 +26,7 @@
POSTPROCESS_HEADER_RULE="${SRCROOT}/scripts/postprocess-header-rule"
[[ -x "${POSTPROCESS_HEADER_RULE}" ]] || { echo "### Unable to find ${POSTPROCESS_HEADER_RULE}"; exit 1; }
+TIMESTAMP="${TARGET_TEMP_DIR}/postprocess-headers-timestamp"
function rewrite_headers ()
{
@@ -38,3 +39,4 @@
}
rewrite_headers "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}" Private
+touch "${TIMESTAMP}"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes