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

Precompile Markdown parsing AND printing #55752

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PallHaraldsson
Copy link
Contributor

@PallHaraldsson PallHaraldsson commented Sep 12, 2024

Improvement on top of #55715, replacing it, to also precompile printing. And then also fixing parsing and using regression for #55706.

@PallHaraldsson
Copy link
Contributor Author

[This shouldn't need a full CI, since a trivial tested add-on.]

This is likely the better backport target for 1.11, assuming it only adds to pkgimage (i.e. not the sysimage), not concerned about bloating it, a bit.

This could precompile a bit more for stdout, not just stderr, but unsure how to do that, also likely not a large improvement. It also misses some tags, for images, not as important, maybe easy to add, but I don't want this to hold up releasing 1.11. Can always be added later...

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Sep 12, 2024

Julia support the CommonMark extension: https://www.markdownguide.org/extended-syntax/ but is it the only one, e.g. no R Markdown allowed? The parser will not fail at any extension, just ignore it, so might be ok to include here, for later compatibility?

I was looking into what basic tags to add here, and what more, maybe, I see we likely do not support latest 2024 CommonMark https://spec.commonmark.org/0.31.2/changes.html since I found in the code: https://spec.commonmark.org/0.19/#absolute-uri

@KristofferC
Copy link
Sponsor Member

Note that this will precompile many things for

julia> typeof(devnull)
Base.DevNull

which is not the type that will typically be used when printing things.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Sep 13, 2024

This is now done.

You can't simply skip devnull, because then it would show, and I'm not sure how to avoid that differently, than I do now.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Sep 15, 2024

I think ithis is now done for the 1.11 backports. Only question is the precompile I got for Markdown (probably harmless to have here; or skip it): precompile(Tuple{typeof(Base.:(^)), String, Int64})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants