SQLite Forum

SQLite3.exe fails to handle huge multi-line-comment
Looks like it's this bit in shell.c:

        else if (nSql && _all_whitespace(zSql)) {
            if (ShellHasFlag(p, SHFLG_Echo)) printf("%s\n", zSql);
            nSql = 0;

As `zSql` is built up line by line during the comment, _all_whitespace works on the string character by character.  Pretty much the poster child for an On^2 loop.

Not sure the best way to solve it.  Commenting out this bit prevents the slowdown, but also prevents the printf call, of course.