<p dir="auto">I am using Julia for an application in PDE-constrained optimization, and have run into an issue I haven't seen before, giving a segfault when trying to return (apparently) from a function call. I only mention the nested functions because in the optimization setup, I construct functionals using passed data, and then pass <em>those</em> functionals to my optimization routine. Not sure if that is creating some issue behind the scenes.</p>
<p dir="auto">Based on the optimization trace, all of the iterations in the solver are working correctly, but then something breaks. The embedded PDE solver and optimization routine have passing unit tests, so I'm (pretty) sure the problem is not with their separate functionality, but somehow at the interface between them.</p>
<p dir="auto">The gist with the backtrace is here <a href="https://gist.github.com/jgoldfar/b311086329af529fff42">https://gist.github.com/jgoldfar/b311086329af529fff42</a>. The same issue appeared in version 0.3.0 I've been using for a while, but I figured I'd update to check if it resolved somehow. I'd be happy to look more into what is causing the issue on my own if someone could point me in the right direction!</p>
<p dir="auto">This is a cross-post of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="535694501" data-permission-text="Title is private" data-url="https://github.com/JuliaGraphics/Gtk.jl/issues/466" data-hovercard-type="issue" data-hovercard-url="/JuliaGraphics/Gtk.jl/issues/466/hovercard" href="https://github.com/JuliaGraphics/Gtk.jl/issues/466">JuliaGraphics/Gtk.jl#466</a>. Brief summary: there is a 10x increase in package load time for Gtk (from ~1s to ~10s), for which the main culprit is the sheer number of calls to <code class="notranslate">jl_recache_method_instance</code>. Looking at the signatures it's being called on, it's not clear that all of those deserve to be there.</p>
<p dir="auto">This <em>might</em> be a consequence of the new artifact system, but the signatures lead me to be skeptical that it's related.</p>