Skip to content

Refactor and optimize EPC files parsing, add more unit tests

Pavel Kisliak requested to merge epam/optimize_epc_parsing into main

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [No]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description

This MR does not contain any changes in the logic, just refactoring and performance improvements:

  • Remove few declarations of default destructors, they preventing generation of default move constructor/assignment operator (even this marked as default)
  • Use move semantics in the several methods in the Package class
  • Remove redundant usage of std::ostringstream when extracting file from ZIP (MiniZip has no declared limitation for buffer size in the unzReadCurrentFile())
  • Remove other redundant allocations/buffers
  • Fix UB that is related to multiple std::move() on the same values in the Package::scan()
  • Add more unit tests for Package class

Can't say about numbers, I was not developed special benchmarks for this part of code, at least not worse if look to overall time of tests execution.

ToDo (in separate MR): fix wrong datetime of files in the EPC archive like 2/07/06 (only on Linux and it's not related to update MiniZip)

I've not created trusted branch, as I see that CI is not working after the last merge...

Merge request reports