Skip to content

Commit a84c956

Browse files
committed
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.
1 parent 7cb253e commit a84c956

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/parser/scan.l

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.66 2000/03/11 05:14:06 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.67 2000/03/13 01:52:06 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -47,6 +47,9 @@ static int myinput(char* buf, int max);
4747
#undef YY_INPUT
4848
#define YY_INPUT(buf,result,max) {result = myinput(buf,max);}
4949

50+
/* No reason to constrain amount of data slurped per myinput() call. */
51+
#define YY_READ_BUF_SIZE 16777216
52+
5053
#else /* !FLEX_SCANNER */
5154

5255
#undef input

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy