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

Adding a using ProfileView statement slows down my application by a factor of >20x #167

Closed
jonathan-laurent opened this issue May 11, 2021 · 3 comments

Comments

@jonathan-laurent
Copy link

I am observing a strange phenomenon where the only fact of adding a using ProfileView statement (without using any function from this package) slows down my application by a huge factor (>20x).

For example, the following code snippet should work fine in an REPL:

]add AlphaZero@0.5
using AlphaZero
Scripts.train("tictactoe")

Here, the initial benchmark (AlphaZero against MCTS) should terminate in under a minute (in fact, the progress bar does not even show up).
However, if one runs the following:

]add AlphaZero@0.5
using AlphaZero
using ProfileView
Scripts.train("tictactoe")

the initial benchmark still hasn't terminated after 15 minutes. Note that the order in which AlphaZero and ProfileView are included does not matter here. Note that the example above does not rely on a GPU. Also, the following warnings are printed after running the using ProfileView statement.

Gtk-Message: 21:00:48.862: Failed to load module "canberra-gtk-module"
Gtk-Message: 21:00:48.862: Failed to load module "canberra-gtk-module"

Any idea why this is happening?

Configuration

  • Ubuntu 20.04
  • Julia 1.6.1
  • ProfileView v0.6.9
  • AlphaZero v0.5.0
@timholy
Copy link
Owner

timholy commented Jul 18, 2021

Is your application threaded? JuliaLang/julia#35552

@jonathan-laurent
Copy link
Author

It is threaded indeed and the issue you mentioned seems relevant. I'll try again on more recent Julia releases.

@IanButterworth
Copy link
Collaborator

This is now fixed on recent releases when no windows are open, but having a ProfileView window open will still slow down threaded code. (moving a mouse over the window will get a lot of speed back, as it wakes up the process that's blocking)

Given this issue is about using ProfileView only, I think it can be closed.

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

3 participants