I have what I feel is a very good answer for question Summary of manyglm model objects running too slowly in R; can I speed them up?. However, this does look like a question for Stack Overflow, more than for Cross Validated. What should I do? Should I flag the question as off-topic and then answer once it has been moved to Stack Overflow? Or should I answer it here?
This is often a delicate decision. Without purporting to survey all the possibilities, I note a continuum of situations here, in terms of merit of question (how far is it a good question answerable somewhere?) and appropriateness of questions (how far is it on-topic anywhere, on Stack Exchange or in other forums?).
Even if there are votes to close or to migrate, the process may be slow and/or not converge to a decision (and those votes may not be visible or noticed).
Even if a question is doomed as not being on-topic anywhere (e.g. by being too software-specific for CV, but also lacking a reproducible example, or asking for function or package recommendations, so predictably off-topic on Stack Overflow) writing an answer may still seem helpful. The hope is that the OP will learn something, even if it is mostly that their question needs more work. My decision on whether to answer often hinges on how a question seems really lazy, meaning appearing to be totally lacking in research effort.
A question that is likely to be migrated will be migrated with answers, so the effort is not wasted. This is the most positive of these categories, as people can answer here in the hope that their answer will be a contribution elsewhere. This is often the case with software-based questions.
On the other hand, a question that is re-posted outside Stack Exchange or deleted here could lose any existing answer, or even a link to them. The effort of answering may then be wasted long term.
A related issue is cross-posting both on Stack Exchange and on non-Stack Exchange forums, because dubiously appropriate questions often get cross-posted. I've seen the same question on three forums simultaneously. The defence is that posters are unsure about where best to post, but many people are careless of the waste of others' time often caused by cross-posting. The latter has been discussed on SE Meta but almost daily I write advice to be explicit about cross-posting anywhere.
If a question is easy to answer, answer it. In so doing the OP is helped. Now, if it gets moved, deleted, modified, closed or otherwise traumatized, that does not modify your contribution to the OP's sanity, you will still have done your good deed for the day. Will you garner respect from that? Eventually, for enough answers, you will. Indeed, sometimes a good answer helps to protect the question, or it gets moved by a moderator to a duplicate question as an answer there.
Being off-topic a little bit is usually tolerated. Outrageous stuff tends to last only a few minutes on CV before it is expunged. Stuff in the middle, moderately off topic is anyone's guess. Sometimes the off-topic nature is ignored, sometimes not, depends more on the stochastic nature of the review process than on actual content.