nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.66k stars 29.63k forks source link

`test-gc-http-client-onerror` is very slow with Xcode 16.0 #54981

Closed targos closed 1 month ago

targos commented 1 month ago

I just upgraded my Mac to macOS 15 and Xcode to the new version that comes with it (16.0).

With a fresh build, ./node test/sequential/test-gc-http-client-onerror.js is extremely slow. It takes 2m20s (with ~400% of constant CPU usage), while official Node.js 22.8.0 and the latest nightly build both finish in less than a second.

RedYetiDev commented 1 month ago

CC @nodejs/platform-macos

lpinca commented 1 month ago

I can't reproduce on my mac

$ npx envinfo --system

  System:
    OS: macOS 15.0
    CPU: (16) x64 Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
    Memory: 2.93 GB / 32.00 GB
    Shell: 5.2.32 - /usr/local/bin/bash

$ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ time ./node test/sequential/test-gc-http-client-onerror.js > /dev/null

real    0m0.473s
user    0m0.799s
sys 0m0.079s
targos commented 1 month ago

I have Apple clang 16:

$ npx envinfo --system

  System:
    OS: macOS 15.0
    CPU: (12) arm64 Apple M2 Pro
    Memory: 233.48 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh

$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
lpinca commented 1 month ago

I've updated the command line tools and rebuilt node but I still can't reproduce

$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: x86_64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ time ./node test/sequential/test-gc-http-client-onerror.js > /dev/null

real    0m0.475s
user    0m0.810s
sys 0m0.082s
targos commented 1 month ago

I cleaned (git clean -fdx) and rebuilt (fast, thanks ccache). Can't reproduce anymore. Sorry for the noise.