Open songjhaha opened 9 months ago
All modified lines are covered by tests :white_check_mark:
Comparison is base (
2a9f077
) 67.30% compared to head (436b314
) 67.44%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @songjhaha, Sorry this hasn't been reviewed yet. I just saw this PR while scrolling by and was wondering if this still has an impact on v1.10 or whether https://github.com/JuliaLang/julia/pull/49525 was enough to fix this issue?
I see this locally:
julia> @time using PyCall
0.311416 seconds (367.73 k allocations: 24.860 MiB, 3.42% gc time, 66.53% compilation time: 98% of which was recompilation)
julia> @time using PyCall
0.000159 seconds (151 allocations: 13.984 KiB)
Thanks! Miles
This PR is trying to solve the high latency when
using PyCall
in second time like https://github.com/JuliaPy/PyCall.jl/issues/1052.We found the method defination
Base.convert(::Type{Nothing}, ::MyType)
would create many method invalidations, which casues this latency (see https://github.com/JuliaLang/julia/issues/51389), so this PR remove the methodconvert(::Type{Nothing}, ::PyObject)
, and some patches by @thautwarm solve the auto convertingconvert(::Type{PyAny}, o::PyObject)
.before this PR:
after this PR:
This latency time is estimated in Julia1.9.3 and win10 OS