Richterrettich / rpm-rs

A pure rust library for building and parsing RPM's
Other
39 stars 18 forks source link

improve signature memory efficiency #11

Open drahnr opened 4 years ago

drahnr commented 4 years ago

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

Richterrettich commented 4 years ago

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

drahnr commented 4 years ago

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

Richterrettich commented 4 years ago

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

drahnr commented 4 years ago

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