You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the branches or the maintainers' PRs for upcoming features.
Feature Request
I use JDA in a few production applications and had been wondering why the shaded JARs for those applications had gotten so much bigger since upgrading. As a result I decided to test exactly how much each JDA dependency contributes to final JAR size:
Tink - 4.4MB
Opus - 4.0MB
OkHttp - 3.0MB
Trove4J - 2.4MB
Jackson - 2.2MB
Commons Collections - 734KB
Websocket Client - 121KB
SLF4J - 66KB
Jetbrains Annotations - 30KB
The Opus dependency was obvious, but my bots don't need audio so I was already excluding that. Even bigger than that though was Tink. Turns out thats also just audio and can be excluded in the same way. This should definitely be documented somewhere similar to how the Opus dependency is treated.
As a sidenote, the entire Kotlin standard library being pulled in just to use OkHttp feels a bit wasteful.
The text was updated successfully, but these errors were encountered:
While I think obsessing over JAR sizes is not necessary, it is reasonable enough to remove Tink when not using audio, you can open a PR documenting that.
As a side note, you can remove classes while shading to reduce the size. JDA builds minified artifacts, and you can look how it is done.
Another alternative when your bot runs in a container, is to not use shaded JARs, you can instead use jib to create docker images for your bot, which will efficiently build them.
General Troubleshooting
Feature Request
I use JDA in a few production applications and had been wondering why the shaded JARs for those applications had gotten so much bigger since upgrading. As a result I decided to test exactly how much each JDA dependency contributes to final JAR size:
4.4MB
4.0MB
3.0MB
2.4MB
2.2MB
734KB
121KB
66KB
30KB
The Opus dependency was obvious, but my bots don't need audio so I was already excluding that. Even bigger than that though was Tink. Turns out thats also just audio and can be excluded in the same way. This should definitely be documented somewhere similar to how the Opus dependency is treated.
As a sidenote, the entire Kotlin standard library being pulled in just to use OkHttp feels a bit wasteful.
The text was updated successfully, but these errors were encountered: