Skip to content

Commit

Permalink
Memory optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed May 26, 2024
1 parent 9372507 commit ab97559
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dependencies {
implementation("net.dv8tion:JDA:5.0.0-beta.24") {
exclude(module = "opus-java")
}
implementation("com.github.21Joakim:JDA-Memory-Optimizations:0.0.15")

// Framework
implementation("com.github.devoxin:flight:e30e521")
Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/me/devoxin/jukebot/Launcher.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.devoxin.jukebot

import com.jockie.jda.memory.MemoryOptimizations
import com.sedmelluq.discord.lavaplayer.jdaudp.NativeAudioSendFactory
import com.sedmelluq.discord.lavaplayer.tools.PlayerLibrary
import io.sentry.Sentry
Expand Down Expand Up @@ -85,6 +86,9 @@ object Launcher {
exitProcess(0)
}

MemoryOptimizations.setSelfSynchronized(true)
MemoryOptimizations.installOptimizations()

config = Config.load(parsed.getOptionValue("config") ?: "config.properties")

Message.suppressContentIntentWarning()
Expand Down

0 comments on commit ab97559

Please sign in to comment.