pyOneNote icon indicating copy to clipboard operation
pyOneNote copied to clipboard

Optimized memory usage

Open ideeockus opened this issue 1 year ago • 1 comments

  • Removed collecting files content in memory

  • Read files content by chunks

  • Removed redundant conversions e.g. struct.unpack('{}s'.format(self.cbLength), file.read(self.cbLength)) -> file.read(self.cbLength)

  • Added the cli argument --optimize to enable optimized memory mode: no json conversion, no bytes.hex() logging etc

It may be useful when handle large files.

comparison

original: image

optimized: image

ideeockus avatar Apr 27 '23 19:04 ideeockus

Thank you for your contribution and my apologies for the late response. Will try to review this soon

DissectMalware avatar Jan 29 '24 18:01 DissectMalware