|
From: Christoph J. <chr...@ma...> - 2018-05-03 13:07:17
|
Just realized that there are many commits due to the late merge. Here is the commit of interest https://github.com/quickfix-j/quickfixj/pull/39/commits/8a1cfb78666a5f601c311931410781163a336058 Chris. On 02/05/18 23:37, Christoph John via Quickfixj-users wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > > > Hi, > > there is this pull request which should do what you want: > https://github.com/quickfix-j/quickfixj/pull/39 > > Cheers, > Chris. > > On 02/05/18 23:31, Joshua Johnson wrote: >> QuickFIX/J Documentation:http://www.quickfixj.org/documentation/ >> QuickFIX/J Support:http://www.quickfixj.org/support/ >> >> >> >> >> Hi, >> >> Has there been any discussion about quickfix.Message::toString() using a ThreadLocal >> StringBuilder instead of a heap allocated StringBuilder()? For large volume fix users I would >> think reusing a StringBuilder (which would quickly grow to an optimal size since I imagine most >> fix msgs are close in size) would be be a net positive. >> >> I was thinking of just rolling a custom for our use, something like: >> >> --- [snip] --- >> class Message >> { >> ... >> final ThreadLocal<StringBuilder> tlsb = new ThreadLocal<StringBuilder>() { >> @Override >> public StringBuilder initialValue() >> { >> return new StringBuilder(); >> } >> }; >> >> ... >> >> @Override >> public String toString() { >> ... >> final StringBuilder sb = tlsb.get(); >> sb.setLength(0); >> header.calculate(sb, null, null); >> ... >> } >> >> --- [/snip] --- >> >> Seems however that maybe this would be desired by others so maybe this might be a good change to >> give back to the community. I imagine there might be those who want/need to have the heap >> allocated StringBuilder so maybe setting this behavior per Session would be the way to go. >> >> Thoughts? >> Josh >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org!http://sdm.link/slashdot >> >> >> _______________________________________________ >> Quickfixj-users mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfixj-users > > -- > Christoph John > Development & Support > T +49 241 557080-28 > chr...@ma... > > MACD GmbH > Oppenhoffallee 103 > D-52066 Aachen > www.macd.com > > Amtsgericht Aachen: HRB 8151 > Ust.-Id: DE 813021663 > Geschäftsführer: George Macdonald > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Development & Support T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 D-52066 Aachen www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |