-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Description
Needs some simple precompile statement (and backport to 1.11 would be great!), then alternative to JuliaLang/Pkg.jl#4015, to fix (3x PythonCall startup regression and) 16x for its dependency JuliaPy/CondaPkg.jl#145
Pkg.REPLMode.gen_help() is slow (makes CondaPkg 16x slower, and therefore PythonCall startup), because of md_str macro taking:
julia> @time Markdown.mdexpr(" ... ")
1.846971 seconds (794.50 k allocations: 40.745 MiB, 5.85% gc time, 99.96% compilation time)
:($(Expr(:escape, :((Markdown.MD)(Base.getindex(Any, (Markdown.Paragraph)(Base.getindex(Any, "... "))), Dict{Symbol, Any}(:config => Markdown.Config(Function[Markdown.hashheader, Markdown.list, Markdown.fencedcode, Markdown.blockquote, Markdown.admonition], Function[Markdown.blocktex, Markdown.blockinterp, Markdown.indentcode, Markdown.footnote, Markdown.github_table, Markdown.horizontalrule, Markdown.setextheader, Markdown.paragraph], Dict{Char, Vector{Function}}('!' => [Markdown.image], '_' => [Markdown.underscore_bold, Markdown.underscore_italic], '<' => [Markdown.autolink], '`' => [Markdown.inline_code], '*' => [Markdown.asterisk_bold, Markdown.asterisk_italic], '[' => [Markdown.footnote_link, Markdown.link], '\\' => [Markdown.linebreak, Markdown.escapes], '$' => [Markdown.tex, Markdown.interp], '-' => [Markdown.en_dash]))))))))
The ineffective way to time this was:
julia> @time @time md" ... "
0.000002 seconds (6 allocations: 176 bytes)
0.013056 seconds (219 allocations: 9.352 KiB, 98.93% compilation time)
also before that, this slow:
julia> @time using Markdown
0.021316 seconds (8.72 k allocations: 818.078 KiB)
vs. on 1.10:
julia> @time using Markdown
0.000452 seconds (413 allocations: 44.297 KiB)
Metadata
Metadata
Assignees
Labels
No labels