Skip to content

Message generation length & checksum optimization #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 219 commits into from
May 9, 2018

Conversation

charlesbr1
Copy link
Contributor

Use a thread local to reuse the string builder used to generate the fix message.

Perform message length & checksum calculation after the message has been build, this avoid to iterate over the fields multiple time, and avoid the allocation of some strings many times too.

This is the most important optimization for allocations.

When the charset used to send fix message is not string equivalent to the jvm one, this optimization is not active. (But the code to compute length & checksum in this case will be optimized in a next pull request).

Set the log session id prefix in the logger appender, instead of building a new string on each message
A cache of strings for frequently used integers
Put the string builder used in toString method in a thread local in order to reuse it.
Calculate the message length & checksum after the message is built,  this avoid to compute the message multiple time and to iterate over each field.
If the charset used to send message is not string equivalent to the jvm one, this optimization is not active.
knutae and others added 26 commits June 10, 2016 12:41
Fixes thread race condition regression in http://www.quickfixj.org/jira/browse/QFJ-318. 1.4.0 seems to be the last released version with this fix.

See also: https://sourceforge.net/p/quickfixj/code/826/
 - integrated patch submitted by Scott Harrington
…tance tests

  - the tests will disconnect anyway when there are no more commands in the file
…ting_groups

QFJ-876: Code Generator creates bad code for nested repeating groups
…nce_tests

removed incorrect disconnect command from duplicate identity acceptance tests
Use separate lock objects instead of synchronizing on FileOutputStreams.
 - corrected FIX4.4 data dictionaries
QFJ-886: FIX44.xml InstrumentLeg Inconsistently Defined
…implementation

Noop message store implementation
…-code-refactor

Post jdk8 migration code refactor.
…PUs, by default JDK sets it to 16 but this is not efficient when you have more CPUs.
Adjust SimpleCache concurrency level
…ore messages, it will simply return true to any action or do nothing.
No-op stores does nothing hence test class is not needed.
QFJ-285 Add proxy support (compatible with SSL)
jonfreedman and others added 13 commits January 25, 2018 13:23
…ickfix-j#161)

* pass SessionID to MemoryStore on construction
* Update MemoryStore.java
* fix for NPE on session lookup which causes test failures
* Don't increment sequence number on rejected logon
* Changed to check expected seqnum on RejectLogon
* Reverted unnecessary change in SessionTest
…tion errors (quickfix-j#172)

* QFJ-940: Event log omits parts of received message in case of validation errors
 - in case of errors: log raw message data instead of incompletely parsed message
 - added method Message.toRawString() which returns the message string as it was passed to the Message class
 - added unit test
 - improved some log messages in Session class
…x-j#171)

* Overload MessageFactory.create to accept ApplVerID for message creation.
* Add DefaultMessageFactory constructor which accepts defaultApplVerID value.
* Fix DefaultMessageFactory default constructor to pass ApplVerID value instead of BeginString value
* Crack NOS for FIX50SPX in ATMessageCracker
…D. (quickfix-j#174)

Some calls to isSetting() don't specify the sessionID
…o… (quickfix-j#168)

* QFJ-943: optional watermarks-based back pressure propagaion from inbound queue to the socket
 - added logic to unregister Session to Session.close() method
 - changed some tests to use try-with-resources on Session
 - changed Connector implementations to clean up used Sessions on stop
 - changed AbstractSocketInitiator to clean up internal map of initiators on stop
this is not supported anymore on JDK8
to get complete stack trace in case of Exceptions during test run
…a(96) without RawDataLength(95) (quickfix-j#181)

- improved error message
@chrjohn chrjohn added the TODO label Mar 15, 2018
chrjohn added 7 commits March 19, 2018 10:57
* QFJ-942: Connectors sometimes hanging in call to dispose() when stop() was called
 - introduced SessionConnector.closeManagedSessionsAndDispose() which makes an effort to close all managed sessions and disposes the IoService
 - used new method in Acceptor, Initiator and TestConnection (used for acceptance tests)
@chrjohn
Copy link
Member

chrjohn commented Apr 10, 2018

There are some problems in the MessageTest when parsing incomplete messages, i.e. where BeginString etc have not been added yet. Will improve the code.

chrjohn added 2 commits May 2, 2018 22:54
…inString etc have not been added yet

- updated MessageTest
- changed NumbersCache to only hold numbers up to 99999 since it should be sufficient for normal use cases
- minor renaming
@chrjohn
Copy link
Member

chrjohn commented May 9, 2018

@chrjohn chrjohn removed the TODO label May 9, 2018
@chrjohn chrjohn merged commit 6229d07 into quickfix-j:master May 9, 2018
@chrjohn chrjohn added this to the QFJ 2.1.0 milestone May 9, 2018
@charlesbr1
Copy link
Contributor Author

Great job, thanks you @chrjohn !

@chrjohn
Copy link
Member

chrjohn commented May 14, 2018

No problem @charlesbr1 . Thanks for the contribution and sorry again for the slow merge. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.