Skip to content

Performance improvement in extract_data

Niklas Mertsch requested to merge (removed):master into master

The function extract_data takes up most of the runtime of JPKFile(filename) (75-95 % on my sample files), because it loops over binary arrays and unpacks them value by value (using struct.unpack). By using struct.unpack_from on the whole binary array, the function becomes significantly faster, reducing the overall runtime by about 70-90 %.

Merge request reports

Loading