From: Tom Lane Date: Mon, 13 Mar 2000 01:52:06 +0000 (+0000) Subject: Performance improvement for lexing long strings: increase flex's X-Git-Tag: REL7_0~451 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a84c95634e2c90e262f9634d83f6d2f258692612;p=postgresql Performance improvement for lexing long strings: increase flex's YY_READ_BUF_SIZE, which turns out to have nothing to do with buffer size. It's just a totally arbitrary upper limit on how much data myinput() is asked for at one time. --- diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index 3a05a841ab..f972d6ead1 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.66 2000/03/11 05:14:06 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.67 2000/03/13 01:52:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -47,6 +47,9 @@ static int myinput(char* buf, int max); #undef YY_INPUT #define YY_INPUT(buf,result,max) {result = myinput(buf,max);} +/* No reason to constrain amount of data slurped per myinput() call. */ +#define YY_READ_BUF_SIZE 16777216 + #else /* !FLEX_SCANNER */ #undef input