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

Performance issues #56

Closed
cstjean opened this issue Jun 13, 2016 · 4 comments
Closed

Performance issues #56

cstjean opened this issue Jun 13, 2016 · 4 comments

Comments

@cstjean
Copy link
Contributor

cstjean commented Jun 13, 2016

ProfileView is great for profiling small or medium-sized functions. But on Julia 0.4.5, OSX, in IJulia, on a more complex codebase, it can sometimes take 3 minutes+ to display the flame graph (Firefox warns me multiple times about unresponsive scripts). And then whenever I resize it (by accidentally scrolling the mouse on top of it) it takes another 30-40 seconds to settle. Is that also a problem on other platforms? What could I do to improve this, do you know where the slowdown comes from?

@timholy
Copy link
Owner

timholy commented Jun 14, 2016

Try it first with the Gtk interface (e.g., from the REPL). Assuming it's very fast there, look into #18.

@cstjean
Copy link
Contributor Author

cstjean commented Jun 14, 2016

Thank you for the pointers. @darwindarak's observation was correct - it's the text labels on the rectangles that slow things down. Turning them off (removing data-shortinfo="$shortinfo") solves the problem entirely. I'd like to have an option if rectangle-is-small then don't output data-shortinfo, but I don't know SVG at all, and only a little bit of HTML. So far I've got this:

        # Don't display the label if there isn't space for 20 characters
        short_info_element = (width < avgcharwidth*20 ? "" : 
                              """data-shortinfo="$shortinfo" """)
        print(f, """<rect vector-effect="non-scaling-stroke" x="$xstart" y="$y" width="$width" height="$ystep" fill="rgb($red,$green,$blue)" rx="2" ry="2" $short_info_element data-info="$info"/>\n""")

and it kinda works, but for some reason there are more labels that appear when I shrink the image with the mouse-wheel, and I'm baffled by that behaviour. The HTML isn't recomputed at each mouse-scroll, is it? There's something about the program logic that I'm not understanding. Any suggestion is appreciated.

@cstjean
Copy link
Contributor Author

cstjean commented Jun 14, 2016

I spoke too soon - I'm not so sure that the text labels are to blame anymore. I'm just not the right person to be working on this, sorry...

@cstjean cstjean closed this as completed Jun 14, 2016
@timholy
Copy link
Owner

timholy commented Jun 14, 2016

I'm not either, sorry.

One other workaround might be to decrease this number, to something like 100-1000 or so. It should greatly reduce the number of boxes it draws, but it will drop out more calls that don't add a lot to the total time.

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