3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-26 08:10:14 +01:00
Commit graph

13 Commits

Autor SHA1 Nachricht Datum
Andrew Steinborn
f62768be9a Fix native compile as libdeflate moved to CMake
Fixes #890 correctly. Also rebuild the compression/encryption natives on macOS and Linux ARM64.
2023-01-01 11:45:47 -05:00
Andrew Steinborn
4b1cdbcb31 I have sinned but it feels good 2022-06-08 01:18:19 -04:00
Andrew Steinborn
0f919d7163 Recompile natives for Linux x86_64
Debian 9 was used to compile the libdeflate native and OpenSSL 1.1.x crypto, CentOS for OpenSSL 1.0.x crypto only.
2020-10-27 01:44:14 -04:00
Andrew Steinborn
bb31226e09 Clean up more cipher code and make it -Wall + -Werror clean 2020-09-16 00:07:52 -04:00
Andrew Steinborn
1bb84f81df Rewrite native crypto to use OpenSSL
OpenSSL is much more portable and optimized (important for aarch64) and most systems already have a version.

Unfortunately, OpenSSL likes to break their ABI. Thankfully, Velocity's natives system is very flexible largely, so we can provide multiple versions of this crypto.

Versions of the dynamically-linked crypto were compiled on CentOS 7 (still supported until 2024, uses OpenSSL 1.0.x) and Debian 9 (the oldest distro including OpenSSL 1.1.0, whose LTS supports ends in 2022). The choice of distros was intended to cover most modern distributions (2014 and afterwards).

An ARM compilation (using Debian 9) will be published soon.
2020-06-22 20:14:46 -04:00
Andrew Steinborn
bb69481f99 Lay down foundation for cross-architecture natives
We have dropped the rarely used kqueue and replaced it with the new Netty aarch64
native. In addition, lay down the foundation for other aarch64 natives.
2020-06-04 14:59:22 -04:00
Andrew Steinborn
b3bd773fea Switch out Cloudflare zlib for libdeflate.
libdeflate is significantly faster than vanilla zlib, zlib-ng, and Cloudflare zlib. It is also MIT-licensed (so no licensing concerns). In addition, it simplifies a lot of the native code (something that's been tricky to get right).

While we're at it, I have also taken the time to fine-time compression in Velocity in general. Thanks to this work, native compression only requires one JNI call, an improvement from the more than 2 (sometimes up to 5) that were possible before. This optimization also extends to the existing Java compressors, though they require potentially two JNI calls.
2020-05-24 10:56:26 -04:00
Andrew Steinborn
e21c33d435 Switch to zlib-ng
zlib-ng boasts higher throughput than regular zlib, by combining patches
from Cloudflare, zlib, and ARM's improvements to zlib along with a more
modern codebase.

Profiling consistently shows that compression is the largest CPU expense
by far, so even a minor speed-up here is significant.
2019-09-08 23:30:28 -04:00
Andrew Steinborn
d8e7f87506 Forgot to update the JNI compile script for Linux. 2019-01-11 14:15:07 -05:00
Andrew Steinborn
e690d88fa0 Generic MBEDTLS_ROOT 2018-12-24 12:18:36 -05:00
Andrew Steinborn
8aa1fe524e Native cryptography support using mbed TLS 2018-08-04 23:46:41 -04:00
Andrew Steinborn
2e59138428 Cleaned up native code. 2018-08-02 00:43:38 -04:00
Andrew Steinborn
fb4e6fd8f1 JNI native zlib compression 🔥 2018-08-01 22:22:09 -04:00