Browse Source

json: increase read buffer size on the json parser

* Force the size of the `YY_READ_BUF_SIZE` to `1 << 22` and the size of
   `YY_BUF_SIZE` to `YY_READ_BUF_SIZE * 2`.
update/opus-1.6.1
Gabriel Lafond-Thenaille 1 year ago
committed by Steve Lhomme
parent
commit
864ffa9dad
  1. 7
      modules/demux/json/lexicon.l

7
modules/demux/json/lexicon.l

@ -41,6 +41,13 @@
result = (len > 0) ? len : YY_NULL; \
}
/** Forcing the size of the lexer's read buffer to speedup the json parsing */
#define YY_READ_BUF_SIZE (1 << 18)
#ifdef YY_BUF_SIZE
# undef YY_BUF_SIZE
#endif
#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2)
%}
%%

Loading…
Cancel
Save