Perl version, with a tip of the hat to @thiton:
perl -ne 'print length($_)." $_"' file | sort -r -n | cut -d ' ' -f 2-
$_
is the current line, similar to awk's $0
perl-5.24 execution on a 550MB .txt file with 6 million lines (British National Corpus) took 24 seconds
@thiton's awk (3.1.7) execution took 26 seconds
With a tip of the hat to @William Pursell from a related post:
perl -ne 'push @a, $_; END{ print reverse sort { length $a <=> length $b } @a }' file
perl-5.24 execution took 12.0 seconds