cberner / raptorq

Rust implementation of RaptorQ (RFC6330)
Apache License 2.0
293 stars 49 forks source link

Taking too long to encode #144

Closed vinay10949 closed 1 year ago

vinay10949 commented 1 year ago

unencoded_packet_list size is 1020076 bytes , PAYLOAD_SIZE=1280bytes let encoder = Encoder::with_defaults(unencoded_packet_list, (PAYLOAD_SIZE) as u16);; Code gets stuck when i run this .

cavemanloverboy commented 1 year ago

I ran into the same issue. Are you running in release mode?

vinay10949 commented 1 year ago

@cavemanloverboy Yes

cavemanloverboy commented 1 year ago

I just used this library with an 800 MB file and had the appearance of hanging (waited 5 min) on debug, but got <1s encoding on release mode.

cberner commented 1 year ago

@vinay10949 are you able to reproduce this issue by adjusting the settings in https://github.com/cberner/raptorq/blob/master/benches/encode_benchmark.rs ? I can take a look if so

vinay10949 commented 1 year ago

@cberner it takes less than 56ms in release mode, but it takes too long for debug mode @cavemanloverboy

cberner commented 1 year ago

Ah, that's not a bug. You should always use release mode if you care about performance