On 11/19/11 12:36 AM, "Ruslan Zasukhin" <ruslan_zasuk...@valentina-db.com> wrote:
Hi Jim, Hi All, Now I am happy :)))))))) Everything below from my prev letter is right. I have fix this couple places, and have discover yet couple required to be improved for correct reuse(): adaptor -- factory of nillObjects factory of vectors Now RAM do not grows absolutely and speed is v3 no reuse() 24 sec v3 with reused 19.4 sec v3 with reuse 19.7 And I believe I see yet few moments to improve for better speed. I will try in nearest days ... Then inform here. For example, it seems to me, we can perfectly reset also nodes from treeparser. It have also pool. Everything is very similar ... So why to kill pool and create it each time ... Of course I have not get my dream x2 speedup using v3 :) But at least not worse ... > So I have debug debug and have found that > > ================= > 1) Generated Parser contains ctx->adaptor, which contains one more > tokenFactory. And for this factory NEVER is called reset(). > > I have add call reset() for now in the method of generated parser. > This have made things better, but still I see at least two players... > > So next player is: > > ================= > 2) This adaptor also has more deeply hidden factory of trees. > And it is called a lots for nilNode(). > > And this factory > typedef struct ANTLR3_ARBORETUM_struct > > Although is very similar to > typedef struct ANTLR3_TOKEN_FACTORY_struct > > In work with pools, it do NOT have reset() function. > > So I think I will try add reset() method to this struct, > And call it from generated parser reset() method as following > > > static void > SqlParser_v3ParserReset (pSqlParser_v3Parser ctx) > { > RECOGNIZER->reset(RECOGNIZER); > > // RZ added this to see if this fixes grow of RAM. > > ADAPTOR->tokenFactory->reset( ADAPTOR->tokenFactory ); > > ((pANTLR3_COMMON_TREE_ADAPTOR)(ADAPTOR->super))->arboretum->reset( > (ADAPTOR->super))->arboretum); > } > > -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.