—peace and blessings be upon him—said: “When a man lengthens the prayer and shortens the sermon, that is a sign of his understanding of the religion.” He was speaking specifically about the Friday prayer, which is preceded by two sermons. Thus the Prophet ﷺ said, “When a man lengthens the prayer and shortens the sermon, that is a sign of his understanding.”
Although the wording is plainly about the Friday sermon, the rule is general and applies to any occasional address: a speaker should not overburden the congregation. The briefer the sermon, the better, for two reasons. First, so that the listeners do not grow weary; second, so that they can absorb what has been said. When speech drags on, its parts crowd one another out; but when it is concise, well-measured, and comprehensive, it is more beneficial and spares the audience from boredom.
As for lengthening the prayer, what is meant is the moderate length that matches the way the Messenger of Allah ﷺ prayed. His prayers were not excessively long, for he reproved Muʿādh for prolonging the ʿIshāʾ prayer, and he likewise reproached another man for lengthening the Dawn Prayer, saying, “People, some of you make others averse!” Therefore, the intended “length” is the balanced measure that accords with the Prophet’s practice. This applies when one is leading others in prayer; if a person is praying alone, he may lengthen it as much as he wishes.