rpm-rs icon indicating copy to clipboard operation
rpm-rs copied to clipboard

improve signature memory efficiency

Open drahnr opened this issue 5 years ago • 4 comments
trafficstars

For large rpms, currently the content is copied. For rpms with sizes beyond 100mb (the ones with many assets i.e. games) might suffer OOM conditions when running on tighter memory bounds.

Proposal: Migrate to a trait Read based approach, using a custom cursor which allows sequential read across multiple buffers (header + content).

Relevant loc: https://github.com/Richterrettich/rpm-rs/blob/master/src/rpm.rs#L70-L72 https://github.com/Richterrettich/rpm-rs/blob/master/src/rpm.rs#L1454-L1456

drahnr avatar Apr 29 '20 07:04 drahnr

Yes, I think a reader based approach would be nice. Do you want to tackle this?

Richterrettich avatar Apr 30 '20 13:04 Richterrettich

Yep, I should find a few hours to impl that plus do a repo structure refactor :)

drahnr avatar Apr 30 '20 13:04 drahnr

Nice, but please do the restructuring in a separate PR since it is easier to review then.

Richterrettich avatar Apr 30 '20 13:04 Richterrettich

I'll look into the cursor impl once #12 is merged.

drahnr avatar Apr 30 '20 15:04 drahnr