-
Notifications
You must be signed in to change notification settings - Fork 643
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
chrjohn
merged 219 commits into
quickfix-j:master
from
charlesbr1:message-generation-optimization
May 9, 2018
Merged
Message generation length & checksum optimization #39
chrjohn
merged 219 commits into
quickfix-j:master
from
charlesbr1:message-generation-optimization
May 9, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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/
- set jdkLevel to 1.8
- 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
…t to behave like a true cache
…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)
…cs. TargetCompIDs are required
…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
(cherry picked from commit a06f317)
* 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)
…ickfixj into charlesbr1-slf4j-optimization
…charlesbr1/quickfixj into charlesbr1-message-generation-optimization
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. |
…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
Added small wiki page https://github.com/quickfix-j/quickfixj/wiki/JMH-benchmark-for-%2339-and-%2342 |
Great job, thanks you @chrjohn ! |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).