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

2x regression in testing time of small package #53511

Closed
KristofferC opened this issue Feb 28, 2024 · 7 comments
Closed

2x regression in testing time of small package #53511

KristofferC opened this issue Feb 28, 2024 · 7 comments
Labels
compiler:latency Compiler latency
Milestone

Comments

@KristofferC
Copy link
Member

Looking at the time to take to test a simple package (https://github.com/KristofferC/LazilyInitializedFields.jl/actions/runs/8072420307/job/22079073318?pr=30) I see an over 2x regression end to end.

Some numbers:

# nightly
 18 dependencies successfully precompiled in 54 seconds. 31 already precompiled.
# 1.10
 18 dependencies successfully precompiled in 21 seconds. 3 already precompiled.
#nightly
Doctests: LazilyInitializedFields |    1      1  25.3s
# 1.10
Doctests: LazilyInitializedFields |    1      1  10.2s

It is possible this is mostly the same as #52592 which was closed, first without a comment and then with

There seemed to be nothing here to solve after looking into it

but a 2x regression end to end for a very standard simple package seems like something that should be solved

@KristofferC KristofferC added the compiler:latency Compiler latency label Feb 28, 2024
@KristofferC KristofferC added this to the 1.11 milestone Feb 28, 2024
@KristofferC
Copy link
Member Author

Adding a @time to the doctest shows that there is quite a lot of invalidations going on so maybe something with moving out stdlibs.

@KristofferC
Copy link
Member Author

I think a big reason for the slowdown in the end to end testing is that it seems that precompiled code is turned off for stdlibs when running with code coverage now?

❯ julia +1.11 --code-coverage=user --project -q
julia> @time Pkg.status()
...
  6.017179 seconds (2.55 M allocations: 156.633 MiB, 0.42% gc time, 95.98% compilation time)


❯ julia +1.11 --project -q
julia> @time Pkg.status()
...
  0.524139 seconds (1.85 M allocations: 127.566 MiB, 11.85% gc time, 47.12% compilation time)

@IanButterworth
Copy link
Member

IanButterworth commented Apr 16, 2024

Yeah. user is generally too crude as that includes stdlibs. Better to do it by path.

But even with the path approach, as soon as a package is loaded within that path, any further loads don't use pkgimage native code either. The fix is to load your test package last in the test suite.

@IanButterworth
Copy link
Member

Perhaps Aqua should check that the test package is loaded last

@KristofferC
Copy link
Member Author

I added some data in KristofferC/LazilyInitializedFields.jl#38. The last commit (loads the testing package last but it doesn't seem to have much effect.

@IanButterworth
Copy link
Member

Regarding the coverage-on regression the likely relevant PRs are #53439 #53457 @vchuravy @vtjnash

@KristofferC
Copy link
Member Author

I'm going to fold this one into #53570

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

No branches or pull requests

2 participants