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

Showing the output of onany takes too long for large arrays #117

Open
jwahlstrand opened this issue Dec 8, 2024 · 0 comments
Open

Showing the output of onany takes too long for large arrays #117

jwahlstrand opened this issue Dec 8, 2024 · 0 comments

Comments

@jwahlstrand
Copy link

Showing the output of onany takes a ridiculously long time for an Observable wrapping a large array. The example here doesn't need to use onany but is an MWE:

using Observables

o=Observable(rand(3000,3000))

func=onany(o) do val
end

@time display(func)

Output:

1-element Vector{ObserverFunction}:
 ObserverFunction defined at /home/user/.julia/packages/Observables/YdEbO/src/Observables.jl:419 operating on Observable([0.450918 0.330082 … 0.205703 0.00542586; 0.911437 0.605745 … 0.798072 0.804416; … ; 0.859098 0.576516 … 0.951725 0.243679; 0.958703 0.511083 … 0.0163929 0.666014])
 15.139409 seconds (252.63 M allocations: 15.481 GiB, 12.08% gc time, 2.46% compilation time)

This seems to be the cause of JuliaImages/ImageView.jl#292.

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

1 participant