Open rxdiscovery opened 3 months ago
Hello,
When the browser requests compression with Brotli, the algo used by poem is very slow to generate the compression, taking 11s just to compress the swagger UI page.
it's this algo that's causing the problem : CompressionAlgo::BR
fn custom_compress() -> Compression { let algorithms = vec![CompressionAlgo::BR]; // <- ------------ !!!!!!!!!!!!!!!!!!!!!!! Compression::new() .algorithms(algorithms) .with_quality(poem::web::CompressionLevel::Best) }
especially with one of the compression levels : poem::web::CompressionLevel::Default or poem::web::CompressionLevel::Best
poem::web::CompressionLevel::Default or poem::web::CompressionLevel::Best
with other algo's there is no slowness, it's instantaneous :
let algorithms = vec![CompressionAlgo::DEFLATE,CompressionAlgo::GZIP];
(Poem version : 3.0.0)
It's really slow, the problem might be with async-compression, I'm not sure.
async-compression
@sunli829 try upgrading to the new version "v0.4.10" , maybe this will solve the problem ?!
Hello,
When the browser requests compression with Brotli, the algo used by poem is very slow to generate the compression, taking 11s just to compress the swagger UI page.
it's this algo that's causing the problem : CompressionAlgo::BR
especially with one of the compression levels :
poem::web::CompressionLevel::Default or poem::web::CompressionLevel::Best
with other algo's there is no slowness, it's instantaneous :
(Poem version : 3.0.0)