Copyright © 2026 Unity Technologies
Steps to reproduce:
Actual results:
InitializeOnLoad now takes ~16 seconds trying to resolve DNS
Expected results:
InitializeOnLoad does not take any time
Reproducible with versions:
0.5.0-exp.1, not tested with other versions
Not reproducible with versions:
N/A
Can’t test with versions:
N/A
Tested on (OS):
Linux Fedora 44
Notes:
What's slow Every domain reload in Logs/Editor.log spends ~15-16 s of a ~17 s reload in ProcessInitializeOnLoadAttributes (13 reloads, all between 14.6 s and 16.3 s). There are no [InitializeOnLoad] types under Assets/; the one static constructor that shows up in the log during that phase is the Pipeline package's PipelineServerStartup (com.unity.pipeline 0.5.0-exp.1, from the registry). Root cause BasePipelineServer.AddLoopbackPrefixes binds the HTTP listener with the prefix http://+:{port}/ (Library/PackageCache/com.unity.pipeline@24975d51528a/Runtime/Common/BasePipelineServer.cs:275). On Windows + is an http.sys wildcard, but Mono's HttpListener only special-cases *; for any other host string it calls Dns.GetHostEntry(host), so it does a real DNS lookup for a host literally named +. On this machine (systemd-resolved at 127.0.0.53) that lookup fails slowly: - getent hosts + : 7.9 s (A + AAAA) - On Unity's own bundled Mono, a small probe: Dns.GetHostEntry("+") 4.05 s, HttpListener("http://+:7898/").Start() 4.0 s, HttpListener("http://*:7898/").Start() 0 ms And the startup path pays it twice: FindAvailablePort() -> IsPortAvailable(7800) builds a + listener to test the port (BasePipelineServer.cs:1946), then OpenListener() builds the real one. Two lookups at ~8 s each is your 15-16 s, and it repeats on every reload because the static ctor re-runs each time.
Local workaround
I ended up changing the binding to listener.Prefixes.Add($"http://*:{port}/");. so it maps straight to IPAddress.Any with no DNS. That helped but it still adds ~1 second to InitializeOnLoad.
Issues you vote on will appear here