Skip to content

Commit

Permalink
fix: speed up compressing responses #717
Browse files Browse the repository at this point in the history
Tests on a medium-sized data set (3552 sequences):
I measured request times of /sample/unalignedNucleotideSequences:
- uncompressed: 1300 ms, 65 MB
- gzip compressed: 3100 ms (before: 14 s), 8 MB
- zstd compressed: 970 ms (before: 7.4 s), 342 kB
  • Loading branch information
fengelniederhammer committed Apr 3, 2024
1 parent 3de90f1 commit 1624580
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,18 @@ class CompressingServletOutputStream(
compressingStream.write(byte)
}

override fun write(bytes: ByteArray) {
compressingStream.write(bytes)
}

override fun write(
bytes: ByteArray,
offset: Int,
length: Int,
) {
compressingStream.write(bytes, offset, length)
}

override fun isReady() = outputStream.isReady

override fun setWriteListener(listener: WriteListener?) = outputStream.setWriteListener(listener)
Expand Down

0 comments on commit 1624580

Please sign in to comment.