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

loading ProfileView.jl kills performance for runtests.jl #123

Closed
magerton opened this issue Nov 24, 2019 · 7 comments
Closed

loading ProfileView.jl kills performance for runtests.jl #123

magerton opened this issue Nov 24, 2019 · 7 comments

Comments

@magerton
Copy link

I have a suite of tests for some code that I'm working on. My runtests.jl includes several different .jl files that have tests. Each separate .jl included puts its tests in a separate module. When I put using ProfileView within earlier .jl files, it absolutely kills performance (35ms to 7s) for some of the @btime benchmarks.

If I simply comment out the using ProfileView, the performance hit goes away.

See magerton/ShaleDrillingLikelihood.jl@6fdbe3e

I've tried coming up with a MWE, but so far haven't been able to replicate the performance hit with it. I apologize for this! However, I thought I'd report this in case anyone else runs across this issue.

Here is my attempt at a MWE, which loosely follows the structure of my original runtests.jl

using Revise
using Base.Threads

println("using $(nthreads()) threads")

module Test1

using Test
using StatsFuns
using Random
using BenchmarkTools

@testset "test1" begin
    Random.seed!(1234)
    x = rand(10^4)
    @btime logsumexp($x)
end
end






module Test2

using Test
using StatsFuns
using Random
using BenchmarkTools
using Profile
using ProfileView


@testset "test2" begin
    Random.seed!(1234)
    x = rand(10^4)
    @btime logsumexp($x)
end

end



module Test3

using Test
using StatsFuns
using Random
using BenchmarkTools

@testset "test3" begin
    Random.seed!(1234)
    x = rand(10^4)
    @btime logsumexp($x)  # This would be where performance degradation happens... but it doesn't here
end

end
@timholy
Copy link
Owner

timholy commented Nov 25, 2019

Let me guess, you're on Windows. See JuliaGraphics/Gtk.jl#325

@magerton
Copy link
Author

Thanks, @timholy . I sure am. I'll try running things on a different machine to see if they do better.

@timholy
Copy link
Owner

timholy commented Dec 3, 2019

Can you try on Julia 1.3 with up-to-date packages? Gtk 1.0 got released this morning, maybe it will help?

@magerton
Copy link
Author

magerton commented Dec 3, 2019

Thanks, @timholy. I definitely will. Looks like ProfileViews is restricted to Gtk 0.18 -- does it need to get bumped to allow Gtk 1.0?

@timholy
Copy link
Owner

timholy commented Dec 3, 2019

Oh shoot, yes, thanks for noticing! May take a few days to fix, currently anything using Gtk requires manual intervention in the General registry.

@timholy
Copy link
Owner

timholy commented Dec 6, 2019

Yes, needs to be bumped. It is going to take a few more days due to errors in JuliaGizmos/GtkReactive.jl#91. Sorry I jumped the gun and forgot about the dependencies.

@timholy
Copy link
Owner

timholy commented Dec 10, 2020

I think the latest versions of Gtk fix this, and in any event this isn't technically a ProfileView issue.

@timholy timholy closed this as completed Dec 10, 2020
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

No branches or pull requests

2 participants