comonicon / Comonicon.jl

Your best CLI generator in JuliaLang
https://comonicon.org
MIT License
282 stars 25 forks source link

Latency increase from 1.10 to 1.11 #274

Open jakobnissen opened 4 months ago

jakobnissen commented 4 months ago

A small CLI tool I created had its latency go from 0.9 s to 2.7 s when going from Julia 1.10 to 1.11. This might be due to REPL and Pkg being moved out of the system image.

In total, Comonicon brings in 40 transitive dependencies. That seems like a lot. Perhaps an approach to reducing Comonicon's latency is to cut dependencies.

Roger-luo commented 4 months ago

This is exactly why I proposed this https://github.com/JuliaLang/julia/discussions/48819. This is not sustainable if we require downstream developers to change their implementation every time something is changed upstream.

I'm not sure which downstream dependency has latency changes. Comonicon only has 4 direct non-stdlib dependencies, which is why it doesn't matter that much before 1.11. Again if we require downstream packages with only 4 direct dependencies (now perhaps 5 or 6) to update its code, this is a very big red flag in maintaining the ecosystem. I'd rather just switch to rust.

Roger-luo commented 4 months ago

OK, so it turns out the current solution should be moving the Docs.doc query implementation out of the REPL package.

jakobnissen commented 3 months ago

If https://github.com/JuliaLang/julia/pull/54499 indeed lands and is backported to 1.11, then REPL might not be needed, and can be removed from the dependencies (REPL will be available in versions of Julia before 1.11). Then this issue would be solved.

IanButterworth commented 1 month ago

I've been trying to investigate this from https://github.com/JuliaLang/julia/issues/55171 but cannot build the reproducer. Can anyone help over there?

IanButterworth commented 1 month ago

Bump. I'm interested in investigating this if someone can help

Roger-luo commented 1 month ago

Sorry I got Covid after JuliaCon. I replied in that issue, please let me know if it works for you.