-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add a performance disclaimer to the banner #9123
Conversation
Have you considered adding a link to the performance tips instead? I can see how this is sort of a special case, but even so I find the idea of seeing various bits of documentation / warnings every time I start Julia pretty unappealing, personally. I'd much prefer to enable Lint.jl or TypeCheck.jl by default and receive warnings when they're appropriate (but maybe the banner is a necessary evil for the time being). |
I think no one will read anything that we link to from the REPL. I agree this is pretty unappealing. I see this only as a stopgap and a very ugly one at that. I like the idea of defaulting to linting and typechecking code, but that's going to make the entire REPL session much more verbose. This sort of one-off screen is likely to be ignored after the very first read. (One could even make this text only appear on the first REPL load per machine.) |
Printing a warning from |
Before learning Julia I didn't know what a REPL is. Reading this, I would have assumed there's a module called REPL that I shouldn't be using while benchmarking. "Note that the interactive interface below is intended for exploration and prototyping. |
As much as I do not like this, it will certainly help improve the experience for a lot of newcomers and reduce mailing list traffic. A lot of people who get bit by this probably don't even report on the list and may put off trying out Julia. |
There's still a problem with @eschnett's wording: it makes it sound like there's something inherently wrong with the interactive interface, i.e. that you need to run programs in non-interactive mode. Maybe say something like "Please note that the global namespace is only...". |
What's this "global namespace" y'all keep talking about? (We have to decide what jargon we can rely on, but given the target audience of this message, I don't know how much jargon we can realistically use here.) |
Or just skip the first sentence. |
|
I like the terse version, but rewording it:
|
I was serious about giving a warning for Better yet, print a warning (with That being said, I have no objection to printing a warning in the REPL banner, but I think this should be in addition to a (permanent) |
I think it would be annoying if there was a warning from |
Targeting messages specifically at people benchmarking Julia might give a negative impression – it comes off a bit PR conscious to me, even though it's a nicer solution in principle. +1 for Stefan's wording in the banner. Talking about the REPL is misleading because just writing the same code in a file won't actually help (as one might expect coming from GHCi, for example). |
Or how about
Since that gets straight to the heart of the problem – global variables are actually OK, unless they'll be accessed multiple times. |
They can also break type inference in subtle ways even if you don't access them directly in a loop. |
Hmm ok, fair point. Just |
This also seems like a 0.3 commit to me. Those tracking master are probably aware of simple performance issues like this. Unless it makes it easier to maintain going forward, then I guess it doesn't matter that its on master. |
perhaps this would be better suited to be added to the download page, and as a footnote on the speed comparison chart? (and linking to the performance tips page) the proposed text just seems too off-putting for the casual user (too much jargon) |
+1 for Viral's version: #9123 (comment) |
@StefanKarpinski, if the point is to annoy Jeff, maybe we can display this only after checking the current user ;) @ihnorton, it's clear to us, but surely will lead someone to think that it's reasonable to do
Also this is missing the point a bit, I think. I know we're all sensitive to perceptions about Julia's performance, but global scope isn't the only easily visible performance issue in Julia. If I were a windows user who just had to wait 10 seconds to load the REPL and another minute to include Gadfly, a note about performance in global scope would seem a bit out of touch to me. |
I guess the point is to get some basic info in front of the user and let them know that there is a Performance Tips section to look at. |
Honestly, my only goal is to make sure that everyone who tries Julia is told that Julia's performance has some gotchas, which we document in Performance Hints / FAQ. |
@isaiah 's version is the best so far. We could even have a bunch of hints and show a different one every time! |
Fortunes.jl? |
Just print the whole manual, a paragraph at a time. :-) |
FWIW, I have added it to the banner on julia-users. I am trying to figure out how to add this to the welcome email too, but google groups is just too frustrating. |
I like @ihnorton's version (#9123 (comment)) except that I would change "HINT" to "NOTE":
|
And we can also provide the equivalent of Matlab's |
Jokes aside, let's go with the latest modification of @isaiah 's version that @StefanKarpinski posted. |
@ViralBShah, we can easily set up the warning so that it is printed only the first time |
We can do the warn once in toc when used interactively too, in addition to the banner and the mailing list. |
Actually, for master, considering the number of mails we get regarding package incompatibilities/breakages, we should most likely have something along the lines of:
|
I much prefer the idea of warning once when toc or time is used. The point about ijulia is good, and adding stuff like this to the banner is just ugly. I do think the warning is more likely to be read if it's part of output the user is looking for. |
I have just discovered this interesting issue. I try to point out some neglected points here:
The conclusion is: let's stop complaining about the complain in the mailing list and get to improve the quality of the Performance Tip in the manual. |
To illustrate how poorly-written the Performance Tip is, I will argue it one paragraph by one paragraph.
It's OK. I just want to use global variables. I'll use it definitely. I am willing to sacrifice some speed. You guys are genius. Then show me the performance enhancement over Python. (You said "it makes it difficult for the compiler to ...", but you didn't say you will get a performance even worse than Python.)
Really, global variables degrade the performance enormously. It's horrible! It's cruel! Let's put everything into a block. (Now I am frightened, and go to the opposite extreme.)
You just told me to "avoid global variables", so I won't even try the
What the hell is
I don't need you to tell me that. I already know it. But what's the issue with the performance?
What the hell is "REPL"? Not in "toplevel" right? Let's put all code in a module, now it's in the module level! |
@Sisyphuss: The rhetorical strategy you're employing does not have a high success rate. |
@Sisyphuss if you can find places where the documentation can be improved, please prepare a pull request with your suggested changes instead of taking a closed issue in a different direction. |
@Sisyphuss, I'm not quite sure if you're directing your comments at someone in particular or to the core developers specifically, but your tone is a little over-the-top. Much more productive, especially in open-source, is to funnel passion into actually making changes and submitting proposals to improve things. For documentation, GitHub makes it particularly easy to submit a PR to improve a single file (i.e. for Performance Tips, you just need to edit here) |
Thank you @Sisyphuss for opening #11077, which is a much more constructive way to improve matters. Could use a little bit of copy-editing. |
I sincerely believe that adding this disclaimer (or one like it) to the start of every interactive Julia session will substantially decrease the confusion that new Julia users experience. Obviously this is a last-resort kind of measure, but we've had the same performance problems being reported for years. I would argue that the lack of optimization in the global namespace is the single easiest thing newcomers can complain about it, since it makes Julia's fabled C-like performance seem like a lie.
@stevengj also noted on julia-users that we could add this behavior to
toc
, although I couldn't tell if he was being sarcastic or not.