On Mon, Jan 23, 2012 at 3:12 PM, John Elrick <john.elr...@fenestra.com>wrote:

> Brain hurts...
>
> Richard, more information for you.  I rebuilt the call stack checking
> system into pure Delphi and confirmed that yy_reduce appears to be the
> malloc culprit.  I further created a pair of procedures which I can use to
> track the yyruleno from yy_reduce as though it were a call.  Below is a
> representative sample of the data....
>

The parser does lots of little mallocs as it builds a parse tree.  So I
expect it to generate a lot of malloc traffic.  The question is why the
parser is being called so much.

Can you put a printf() or something at
http://www.sqlite.org/src/artifact/1e86210d3976?ln=397 and figure out what
is being parsed so excessively?

>
> One interesting thing I noticed is that in 3.7.5, the average <1kb malloc
> request size is 181.95 bytes.  In 3.7.6 that average request size drops
> to 17.74 bytes.
>
> Both examples are running the same dataset.
>
> version    mallocs   mallocs by yy_reduce
> 3.7.5      838,789       5,545
> 3.7.6   70,003,878  68,870,137
>
> Major yy_reduce case consumers
>
> 3.7.5
> Count:        947 = 'case_112
> yy_reduce'
> Count:        696 = 'case_189
> yy_reduce'
> Count:        537 = 'case_173
> yy_reduce'
> Count:        229 = 'case_243
> yy_reduce
> case_173
> yy_reduce'
> Count:        214 = 'case_37
> yy_reduce
> case_173
> yy_reduce'
>
>
> 3.7.6
> Count:  5,606,345 = 'case_112
> yy_reduce'
> Count:  5,267,458 = 'case_243
> yy_reduce
> case_112
> yy_reduce'
> Count:  4,922,428 = 'case_37
> yy_reduce
> case_112
> yy_reduce'
> Count:  4,623,402 = 'case_189
> yy_reduce
> case_112
> yy_reduce'
> Count:  4,278,372 = 'case_8
> yy_reduce
> case_112
> yy_reduce'
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to