Skip to content

Commit 349b663

Browse files
authored
Merge pull request #58 from JuliaParallel/precompilation
Improve precompilation
2 parents 55fd0c5 + 6f957b2 commit 349b663

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,26 @@ jobs:
2626
matrix:
2727
version:
2828
- '1.10'
29-
- '1.11'
30-
- '1.12'
29+
- '1'
3130
- 'nightly'
3231
os:
3332
- ubuntu-latest
3433
- windows-latest
35-
- macos-15-intel # Intel
3634
- macos-latest # Apple Silicon
3735
julia-wordsize:
3836
# The value here only affects the version of Julia binary that we download.
3937
# It does not affect the architecture of the GitHub Runner (virtual machine) that
4038
# we run on.
41-
- '32' # 32-bit Julia. Only available on x86_64. Not available on aarch64.
4239
- '64' # 64-bit Julia.
4340
exclude:
4441
# Killing workers doesn't work on Windows in Julia 1.10:
4542
# (It does work on 1.11+)
4643
- os: windows-latest
4744
version: '1.10'
48-
# We don't have 32-bit builds of Julia for Intel macOS:
49-
- os: macos-15-intel # Intel
50-
julia-wordsize: '32'
51-
#
52-
# We don't have 32-bit builds of Julia for Apple Silicon macOS:
53-
- os: macos-latest # Apple Silicon
45+
include:
46+
- os: ubuntu-latest
5447
julia-wordsize: '32'
48+
version: '1'
5549

5650
steps:
5751
- uses: actions/checkout@v6

src/precompile.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ precompile(Tuple{typeof(DistributedNext.procs)})
33
precompile(Tuple{typeof(DistributedNext.finalize_ref), DistributedNext.Future})
44
precompile(Tuple{typeof(DistributedNext.setup_launched_worker), DistributedNext.LocalManager, DistributedNext.WorkerConfig, Vector{Int}})
55
precompile(Tuple{typeof(DistributedNext.process_tcp_streams), Sockets.TCPSocket, Sockets.TCPSocket, Bool})
6+
precompile(Tuple{typeof(Serialization.serialize), DistributedNext.ClusterSerializer{Sockets.TCPSocket}, Array{Any, 1}})
7+
precompile(Tuple{typeof(DistributedNext.parse_connection_info), String})
8+
precompile(Tuple{typeof(DistributedNext._run_callbacks_concurrently), String, Base.Dict{Any, Union{Function, Type}}, Int64, Array{Tuple{DistributedNext.LocalManager, Base.Dict{Symbol, Any}}, 1}})
9+
precompile(Tuple{typeof(DistributedNext._run_callbacks_concurrently), String, Base.Dict{Any, Union{Function, Type}}, Int64, Array{Int64, 1}})
10+
precompile(Tuple{typeof(DistributedNext.read_worker_host_port), Base.PipeEndpoint})
11+
precompile(Tuple{typeof(Base.put!), Base.Channel{Any}, Int64})
12+
precompile(Tuple{typeof(Base.put!), Base.Channel{Any}, WeakRef})
613

714
precompile(Tuple{typeof(DistributedNext.handle_msg), DistributedNext.IdentifySocketMsg, DistributedNext.MsgHeader, Sockets.TCPSocket, Sockets.TCPSocket, VersionNumber})
815
precompile(Tuple{typeof(DistributedNext.handle_msg), DistributedNext.CallWaitMsg, DistributedNext.MsgHeader, Sockets.TCPSocket, Sockets.TCPSocket, VersionNumber})
@@ -14,6 +21,12 @@ precompile(Tuple{typeof(DistributedNext.handle_msg), DistributedNext.RemoteDoMsg
1421
precompile(Tuple{typeof(DistributedNext.handle_msg), DistributedNext.JoinPGRPMsg, DistributedNext.MsgHeader, Sockets.TCPSocket, Sockets.TCPSocket, VersionNumber})
1522
precompile(Tuple{typeof(DistributedNext.handle_msg), DistributedNext.JoinCompleteMsg, DistributedNext.MsgHeader, Sockets.TCPSocket, Sockets.TCPSocket, VersionNumber})
1623

24+
# These lines were obtained from `addprocs(1; exeflags=`--trace-compile=compilation.txt --trace-compile-timing`)`
25+
precompile(Tuple{typeof(DistributedNext.start_worker)})
26+
precompile(Tuple{typeof(DistributedNext.start_worker), Base.PipeEndpoint, String})
27+
precompile(Tuple{typeof(DistributedNext.set_valid_processes), Array{Int64, 1}})
28+
precompile(Tuple{typeof(DistributedNext.terminate_all_workers)})
29+
1730
# This is disabled because it doesn't give much benefit
1831
# and the code in Distributed is poorly typed causing many invalidations
1932
# TODO: Maybe reenable now that Distributed is not in sysimage.

0 commit comments

Comments
 (0)