[QFJ-722] Unnecessary Trailer and Header object allocation for every Message instance Created: 04/Dec/12 Updated: 17/Jun/20 Resolved: 12/Aug/19 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | 1.5.2 |
Fix Version/s: | 2.2.0 |
Type: | Improvement | Priority: | Default |
Reporter: | Drew Noakes | Assignee: | Wojciech Zankowski |
Resolution: | Fixed | Votes: | 0 |
Labels: | garbage-collection, memory, performance | ||
Environment: |
N/A |
Description |
In quickfix.Message, the field initialisers for 'header' and 'trailer' each new up an object. Generated Message classes then replace these. This creates unnecessary work for the GC. I see no reason that subclasses need to re-assign the trailer. The Header can vary with each FIX version, so perhaps the API could be modified such that the header is created by a protected method which is overridden in generated subclasses. |