Skip to content

fix: Refactor trailer fields statistics calculations to allow individual data record update#16

Open
steven-liou wants to merge 19 commits intomasterfrom
SC-21715
Open

fix: Refactor trailer fields statistics calculations to allow individual data record update#16
steven-liou wants to merge 19 commits intomasterfrom
SC-21715

Conversation

@steven-liou
Copy link

Refactor moov library to be able to update trailer record statistics with individual data record.

  • Current approach to have fileInstance hold all processed data records, and then generate header, data record, and trailer segments result in high memory usage when there are millions of data records.
  • Allowing data record segments to be written directly to disk, instead of adding them to fileInstance, reduces memory usage
    • This requires updating trailer segment statistics while individual data record is being processed

AC:

  • Add tests to fileInstance.generatorTrailer() and fileInstance.generatorPackedTrailer() that cover all trailer segment fields statistics (all account statuses and total segment fields calculations)
  • Refactor fileInstance.generatorTrailer() and fileInstance.generatorPackedTrailer() and their related statistics method to TrailerRecord.TallyDataRecord(*lib.BaseSegment) error and PackedTrailerRecord.TallyDataRecord(*lib.BaseSegment) error to calculate trailer segment for each data record.

renovate bot and others added 19 commits August 6, 2025 01:59
…ifact-actions

chore(deps): update actions/download-artifact action to v5
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.10 to 1.16.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.13.10...v1.16.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.5 to 1.18.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.16.5...v1.18.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…and removing all other calcs, and setting first name on j2 as nullable because there are instance where business personally liable where first name may not be set
…ble-legnth-fix

variable length and J2 fixes
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Replace inefficient string concatenation to reduce CPU usage, memory allocations, and
garbage collections
- This change significantly improves performance for large files with
many records
…ler records

Moving trailer generation statistics methods from fileInstance to
TrailerRecords and PackedTrailerRecords to allow direct write of
individual data record to disk, and update the trailer record manually.
Keeping TrailerInformation struct for backward compatibility.
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.

3 participants