From 5f76474027f3be48da6fbd2eba3d5b054985c7b0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 18 Jul 2025 17:17:53 -0400 Subject: [PATCH] Remove debugging macros in `reinit!` due to overhead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ends up having a lot of overhead found in https://github.com/SciML/OrdinaryDiffEq.jl/issues/2757. They are triggered because the `reinit!` code recursively `reinit!`s the internals of the cache, and `LinearCache` doesn't have a `reinit!`, so it's a no-op. This is correct, but it turns out the debugging macro is just really expensive so it makes it slow even though it's not doing anything 😅 . I commented it out so we know where to put SciMLVerbosity.jl instructions for the near future @jClugstor --- lib/NonlinearSolveBase/src/abstract_types.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NonlinearSolveBase/src/abstract_types.jl b/lib/NonlinearSolveBase/src/abstract_types.jl index f43d59012..252650d03 100644 --- a/lib/NonlinearSolveBase/src/abstract_types.jl +++ b/lib/NonlinearSolveBase/src/abstract_types.jl @@ -10,11 +10,11 @@ function reinit! end function reinit_self! end function reinit!(x::Any; kwargs...) - @debug "`InternalAPI.reinit!` is not implemented for $(typeof(x))." + #@debug "`InternalAPI.reinit!` is not implemented for $(typeof(x))." return end function reinit_self!(x::Any; kwargs...) - @debug "`InternalAPI.reinit_self!` is not implemented for $(typeof(x))." + #@debug "`InternalAPI.reinit_self!` is not implemented for $(typeof(x))." return end