I can not erase this question. It has an upvoted answer.

But: It is receiving down votes.

I fail to see why it is a "bad question" (down votes), because it is a question about a fact: bash takes a long time under some condition.

However, it is still receiving down votes.

Is there any way in which it can be repaired to become "an useful question" or should I raise a request to erase it, or … just forget about it? Down votes happen … .

What do you think ?

  • 1
    You have my support. I don't like the downvotes either. – Tim Sep 30 at 1:13
  • Many thanks @Tim. – Isaac Sep 30 at 2:18
  • 1
    Still, 5 upvotes (currently) is not bad. – Kusalananda Oct 1 at 9:51
  • Three upvotes came after this post (which is not what I intended). What I would like is a recommendation, or, at minimum, a guess of why is the question being down-voted. It is over my head, I do not see why. Consequently, I can not fix what I don't see that it's broken. Thanks. @Kusalananda – Isaac Oct 1 at 21:11
up vote 2 down vote accepted

I don't understand how question downvotes are used. Mostly I agree with Anthony Geoghegan's answer.

(Sidenote: it would be useful for the question to name a specific version of bash, that behaves like this. In case a future version of bash manages to fix it :-).

And now I understand this question, it is interesting enough to upvote.

However, the way the question is asked made it hard for me to understand it. The text says a function call is a thousand times slower "but only if there are arguments in the parent calling function". However, both of the test cases actually use a very large number of arguments.

Is the question about any non-zero number of arguments? Or is it about a large number of arguments?

According to the current top answer, the large, thousand-fold slowdown only happens if the number of arguments is "large".

Note, I probably would not upvote if the question was only about a small slowdown. Shell scripts are not expected to be fast. I would not be very interested in learning how to speed up one specific bash script by 2x.


I think there are a couple of other things about the question that are combining with this as well. Seeing such things makes me less likely to spend the time to understand the thread.

One thing is that it can be very difficult to deal with questions that are just about "why."

For example, the current version of the question shows that other shells do not have the same problem. So the question seems to be asking "why hasn't someone already fixed my version of bash?" The general answer is "there are not enough people who want to use <bash functions with ten thousand arguments>". Or, the people that do, do not have any influence on the developers of bash.

In the first case - it would mean there are not many people really interested in the question anyway. In the second case - you're asking about politics, which is more subjective and noisier to answer :-). Also guessing which of those cases applies is probably very subjective and noisy as well :-).

As a general rule, I think the way to avoid this is to answer one level of "why" yourself: Why are you doing this? What is it that you are trying to do?

This helps show some willingness to be challenged about the reason - it allows comments to ask whether you have considered using approach X to achieve your goal instead. Avoiding prolonged suffering on both sides, from the "XY problem".

I would not find this question interesting if I could not imagine a reason for trying to do this. There could be several reasons, but the reason I'm imagining is that you are performing some operation on a large number of files.

If I can't imagine a reason to ask the question, it is hard to guess whether anyone will benefit from researching and writing an answer to it.

  • 1
    The issue presented in the linked question is not "an easy one". It require the copy of arguments from a function call to another, that is not easy to show nor to understand. The issue is about the arguments being copied (internally in bash) from one function call to another. The copy on other shells seem to be only of a pointer to the place where the arguments are, that is why other shells run quite noticeably faster. I'll try to improve the redaction of the question. I will also try to remember the exact problem I was solving at the time this issue presented. Thanks. – Isaac Oct 5 at 21:39
  • @Isaac Mostly I agree with Anthony Geoghegan. Sometimes there are anonymous downvotes, and usually you can't work out why. I don't like it either. I thought I saw some patterns. Maybe what I wrote makes you think of something useful, maybe it does not. I hope you don't spend too much time worrying about it :-). – sourcejedi Oct 5 at 22:01
  • I made some edits, may it be better now? – Isaac Oct 6 at 0:06
  • @Isaac I'm impressed :). Yes, I think that answers my points. Firstly, it admits args = 1 has a small difference (maybe within the margin of error), and the big difference happens with args = 20000. And also, it is explicit that you are interested in the case of passing thousands of arguments. E.g. it was not an accidental problem caused because you used seq just to run a loop thousands of times and measure how long it took. – sourcejedi Oct 6 at 10:02
  • Thank you! :-). – Isaac Oct 8 at 5:50

There’s no need to rescue the question.

I can’t think of any reason why the question received 3 downvotes: the question is about shell behaviour that would affect all users of bash – so it’s interesting and useful for a general audience and not just the specific individual needs of the asker. You’ve also clearly shown the research you have done in trying to understand this behaviour.

Sure, you could probably improve it somewhat because nothing’s ever perfect. However, I wouldn’t sweat it. The downvoters did not provide any comment to explain their reasons (which I’d consider to be good practice).

Over the years, I have noticed there can be bizarre voting on questions, e.g., pure rubbish being upvoted and good questions being downvoted. I would say you were just unlucky to targetted by 3 such users.

  • Many thanks @AnthonyGeoghegan that is exactly what I wanted to have as an answer. +1 – Isaac Oct 2 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .