[ 
https://issues.apache.org/jira/browse/CALCITE-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049354#comment-15049354
 ] 

Julian Hyde commented on CALCITE-1012:
--------------------------------------

For better or worse, that's the API we use. The first time it will populate the 
static SqlParserImpl.metadata field, and it recursively invokes a parser to do 
so. I wouldn't count that in benchmarks. Every time you create a parser it will 
populate 

{code}JJCalls[] jj_2_rtns = new JJCalls[721]{code}

and initialize each with a JJCall - a struct with 4 members. That probably 
accounts for your 70KB.

We could look at re-using parser instances, saving a small number of them in a 
cache. Can you change your benchmark to call one of the SqlParserImpl.ReInit 
methods?

> Benchmark SQL parser
> --------------------
>
>                 Key: CALCITE-1012
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1012
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to