Skip to content

Performance Penalty when using @showprogress @distributed #347

@tmrlvi

Description

@tmrlvi

Hi

I have noticed a large slow down when using @showprogress (200x slowdown)
The following code reproduces the issue (at least on my machine). I'm not sure if you are aware of this issue, or whether it is actually a local issue (or some other mistake on my part).

Julia Version: 1.11.5
ProgressMeter Version: 1.10.4

using Distributed
using BenchmarkTools

addprocs(5)
@everywhere using ProgressMeter

#= Also had penalty when used 1:1000 =#
data = collect(1:1000000)

@btime @distributed (+) for i in data
    i
end

#= dt=100 so we do not get a visible progressbar. Effect is the same without =#
@btime @showprogress dt=100 @distributed (+) for i in data 
    i
end

Result (For 1:1000000):

  3.938 ms (407 allocations: 18.49 KiB)
  12.587 s (84081705 allocations: 4.01 GiB)

Result (For 1:1000):

56.736 μs (362 allocations: 140.75 KiB)
10.388 ms (84551 allocations: 4.25 MiB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions