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

REPL becomes heavy after importing ImageView #159

Closed
ghost opened this issue Oct 9, 2018 · 5 comments
Closed

REPL becomes heavy after importing ImageView #159

ghost opened this issue Oct 9, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 9, 2018

When I used ImageView in REPL in Julia 1.0.1 on Windows 10, REPL's response became slow after importing this library. Characters are displayed but delayed than usual. While the response become heavy, Julia's performance was almost no change.

julia> using Images, TestImages, ImageFiltering
julia> using BenchmarkTools
julia> img = testimage("")
julia> imfilter(img, KernelFactors.gaussian((3, 3)))
julia> @btime imfilter(img, KernelFactors.gaussian((3, 3)))
  5.747 ms (301 allocations: 4.13 MiB)

julia> using ImageView
julia> @btime imfilter(img, KernelFactors.gaussian((3, 3)))
  5.733 ms (301 allocations: 4.13 MiB)

julia> versioninfo()
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

Please forgive me that I'm not sure how to measure the REPL's response time...

@timholy
Copy link
Member

timholy commented Oct 9, 2018

I know it's hard to measure, but are you talking 0.1s per character or 1s per character or something else?

I don't see this on Linux. Does this always happen for you? Any chance your machine just ran out of RAM and began swapping it to disk?

@ghost
Copy link
Author

ghost commented Oct 9, 2018

It's around 0.1s or so on. I also used this module in OSX on MBP, but did not happen at all. This heavy response happens always on both my desktop (shown above) and another laptop PC (less CPU power and RAM), both are Win 10 pro.

Any chance your machine just ran out of RAM and began swapping it to disk?

My desktop PC has 16GB RAM, and its usage was around 50% or so on, so it is unlikely that RAM is the cause.

@timholy
Copy link
Member

timholy commented Oct 9, 2018

Does it happen if you just say using Gtk? Maybe it's the Gtk event loop. If just using the package doesn't trigger the problem, also try a simple demo and see if that gives you the same effect.

@ghost
Copy link
Author

ghost commented Oct 9, 2018

As you mentioned, using Gtk caused the lags. This issue was reported at Julia 0.6.0, and seems to be still open.

JuliaGraphics/Gtk.jl#325

Thanks.

@timholy
Copy link
Member

timholy commented Oct 25, 2018

Since this is a Gtk issue I'll close.

@timholy timholy closed this as completed Oct 25, 2018
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