Skip to content

re-enable precompilation #716

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

Merged
merged 1 commit into from
Jun 6, 2025
Merged

re-enable precompilation #716

merged 1 commit into from
Jun 6, 2025

Conversation

aviatesk
Copy link
Owner

@aviatesk aviatesk commented Jun 5, 2025

Also precompiles the top-level analysis code.

From CHANGELOG.md:

Precompilation of JET has been re-enabled. This should significantly improve
startup times:

$ julia --startup-file=no -e '
    macro simpletime(ex)
        :(let s = time()
            $(ex)
            e = time()
            elapsed = round(e - s; digits=2)
            println("  Elapsed: $elapsed sec")
        end)
    end
    @SimpleTime using JET
    @SimpleTime @report_call sum("julia")
    @SimpleTime report_file(normpath(pkgdir(JET), "demo.jl"); toplevel_logger=nothing)'
v0.10.6
    Elapsed: 1.25 sec
    Elapsed: 10.08 sec
    Elapsed: 11.43 sec
This version
    Elapsed: 1.33 sec
    Elapsed: 0.01 sec
    Elapsed: 0.14 sec

This makes the precompilation during installation take longer.
If you're developing JET itself, we recommend having:

LocalPreferences.toml

[JET]
precompile_workload = false

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.91%. Comparing base (e28c9a1) to head (d53ce42).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #716   +/-   ##
=======================================
  Coverage   86.91%   86.91%           
=======================================
  Files          13       13           
  Lines        2821     2821           
=======================================
  Hits         2452     2452           
  Misses        369      369           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aviatesk aviatesk force-pushed the avi/enable-precompilation branch from b859365 to 8cee808 Compare June 5, 2025 18:08
aviatesk added a commit to aviatesk/JETLS.jl that referenced this pull request Jun 5, 2025
This change significantly improves latency between language server
startup and receiving the first completion after typing. When combined
with aviatesk/JET.jl#716, startup time is considerably enhanced.
Also precompiles the top-level analysis code.

From [CHANGELOG.md](./CHANGELOG.md):

> Precompilation of JET has been re-enabled. This should significantly improve
> startup times:
> ```bash
> $ julia --startup-file=no -e '
>     macro simpletime(ex)
>         :(let s = time()
>             $(ex)
>             e = time()
>             elapsed = round(e - s; digits=2)
>             println("  Elapsed: $elapsed sec")
>         end)
>     end
>     @SimpleTime using JET
>     @SimpleTime @report_call sum("julia")
>     @SimpleTime report_file(normpath(pkgdir(JET), "demo.jl"); toplevel_logger=nothing)'
> ```
> ```
> v0.10.6
>     Elapsed: 1.25 sec
>     Elapsed: 10.08 sec
>     Elapsed: 11.43 sec
> This version
>     Elapsed: 1.33 sec
>     Elapsed: 0.01 sec
>     Elapsed: 0.14 sec
> ```
>
> This makes the precompilation during installation take longer.
> If you're developing JET itself, we recommend having:
> > LocalPreferences.toml
> ```toml
> [JET]
> precompile_workload = false
> ```
@aviatesk aviatesk force-pushed the avi/enable-precompilation branch from 69973cc to d53ce42 Compare June 5, 2025 23:44
aviatesk added a commit to aviatesk/JETLS.jl that referenced this pull request Jun 6, 2025
This change significantly improves latency between language server
startup and receiving the first completion after typing. When combined
with aviatesk/JET.jl#716, startup time is considerably enhanced.

From the new README section:
> JETLS uses [precompilation](https://julialang.github.io/PrecompileTools.jl/stable/)
> to reduce the latency between server startup and the user receiving first
> responses.
> Once you install the JETLS package and precompile it, the language server will
> start up quickly afterward (until you upgrade the JETLS version), providing
> significant benefits from the user's perspective.
>
> However, during development, when you're frequently rewriting JETLS code itself,
> running time-consuming precompilation after each modification might be a waste
> of time. In such cases, you can disable precompilation by adding the following
> settings to your LocalPreferences.toml:
> > LocalPreferences.toml
> ```toml
> [JETLS]
> precompile_workload = false # Disable precompilation for JETLS
>
> [JET]
> precompile_workload = false # Also disable precompilation for JET if you're developing it simultaneously
> ```
@aviatesk aviatesk merged commit 722edc1 into master Jun 6, 2025
11 of 13 checks passed
@aviatesk aviatesk deleted the avi/enable-precompilation branch June 6, 2025 00:05
aviatesk added a commit to aviatesk/JETLS.jl that referenced this pull request Jun 6, 2025
This change significantly improves latency between language server
startup and receiving the first completion after typing. When combined
with aviatesk/JET.jl#716, startup time is considerably enhanced.

From the new README section:
> JETLS uses [precompilation](https://julialang.github.io/PrecompileTools.jl/stable/)
> to reduce the latency between server startup and the user receiving first
> responses.
> Once you install the JETLS package and precompile it, the language server will
> start up quickly afterward (until you upgrade the JETLS version), providing
> significant benefits from the user's perspective.
>
> However, during development, when you're frequently rewriting JETLS code itself,
> running time-consuming precompilation after each modification might be a waste
> of time. In such cases, you can disable precompilation by adding the following
> settings to your LocalPreferences.toml:
> > LocalPreferences.toml
> ```toml
> [JETLS]
> precompile_workload = false # Disable precompilation for JETLS
>
> [JET]
> precompile_workload = false # Also disable precompilation for JET if you're developing it simultaneously
> ```
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.

1 participant