quickfixj icon indicating copy to clipboard operation
quickfixj copied to clipboard

Add an interface for parsing raw data (byte[])

Open bfjm opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Use String to pass messages. String is immutable, but many String objects cannot be reused

Describe the solution you'd like Add an interface for message.fromBytes

Describe alternatives you've considered Use ByteBuffer instead

Additional context In a trading system, we want to reduce gc and increase object reuse, and if we think in terms of byte[], object reuse will increase

bfjm avatar Jan 20 '25 03:01 bfjm

Thanks. Are you able to submit a PR?

chrjohn avatar Jan 20 '25 20:01 chrjohn

Extracting Message interface might be useful and creating new / custom bytes message for this one - in https://github.com/quickfix-j/quickfixj/pull/921

Adding fromBytes method similar to quickfix.Message#fromString(java.lang.String, quickfix.DataDictionary, quickfix.DataDictionary, quickfix.ValidationSettings, boolean) will not achieve much in terms of GC savings as the current quickfix.Message implementation relies heavily on string representation and parsing String quickfix.Message#messageData

the-thing avatar Mar 11 '25 10:03 the-thing