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

display of new plot window always takes 2.3 seconds on windows #509

Open
omerchiers opened this issue Feb 13, 2023 · 2 comments
Open

display of new plot window always takes 2.3 seconds on windows #509

omerchiers opened this issue Feb 13, 2023 · 2 comments

Comments

@omerchiers
Copy link

Hi,

I initially posted this issue on the Plots.jl repo thinking it was a Plots issue, but as a matter of fact the problem appears for plain GR removing suspicion from Plots.jl

julia> @time using GR
  0.183013 seconds (259.54 k allocations: 17.120 MiB, 10.09% compilation time)

julia> @time display(plot(rand(10)))
nothing
  3.002674 seconds (1.04 M allocations: 60.426 MiB, 0.99% gc time, 13.93% compilation time)

julia> @time display(plot(rand(10)))
nothing
  2.559036 seconds (208 allocations: 8.078 KiB)

So as you can see between the first and second invocation of the plot command, the timing is always around 2.5 seconds. Between the 2 invocations the I close the widow. If the window is not closed, the following timing is obtained:

 @time display(plot(rand(10)))
nothing
  0.001452 seconds (208 allocations: 8.078 KiB)

Operating system : windows 10.
I have not observed this on linux.

Best,
Olivier

@jheinen
Copy link
Owner

jheinen commented Feb 14, 2023

There seems to be more system overhead on Windows when starting a Qt application and connect to it using a socket. On Linux and macOS caching and memory management is probably just better. Since this overhead is unavoidable, we made the separation in GR in the first place. So I'm wondering why you want to stop the gksqt application in running Julia session? Isn't it enough to minimize the plot window?

@omerchiers
Copy link
Author

Hi,
Thanks for your answer.
Indeed I could just keep the window minimized and go with that,
but I think it is a bit sad especially now with native code caching in 1.9 that we still have this 2.5 seconds delay on the first plot. It kind of negates the progress made with pkgimages.
Of course I understand that if this is a windows issue, the problem might be hard to solve.

Best,
Olivier

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