Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak type inference to improve TTFX #165

Merged
merged 2 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/DataDeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ include("preupload.jl")
include("fetch_helpers.jl")
include("post_fetch_helpers.jl")


function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
Base.precompile(Tuple{typeof(resolve), DataDep, String, String}) # time: 0.007738324
end

_precompile_()

end # module
10 changes: 5 additions & 5 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ struct ManualDataDep <: AbstractDataDep
message::String
end

struct DataDep{H, R, F, P} <: AbstractDataDep
struct DataDep <: AbstractDataDep
name::String
remotepath::R
hash::H
fetch_method::F
post_fetch_method::P
remotepath
hash
fetch_method
post_fetch_method
extra_message::String
end

Expand Down