This repository was archived by the owner on Aug 18, 2020. It is now read-only.
This repository was archived by the owner on Aug 18, 2020. It is now read-only.
Discord Connector: Massive Performance Issues #76
Closed
Description
Description
After a short amount of time, the memory and cpu load of the discord connector explodes. This happened after 10-30 messages from different users, recorded with this code:
discordInput.get().setChannel("285809306790789120")
discordInput.get().registerChatMessageReceiveEventHandler(
event => log(s"[D] ${event.getMessage.getAuthor.getDisplayName}: ${event.getMessage.getMessage}"))
On my machine, it took up to 90% cpu and over 18 GB of RAM and completely stopped working, did not respond to newer messages.
The profiler shows a huge leak in recorded char arrays / strings. I don't know why this did not came up earlier, but it is a problem :D
How to reproduce
I created a discord bot, joined on a server, configured the connector with the given credentials and executed the code above in a plugin. It took less then a minute to stop working, but worked fine initially.
Error Log
There is no exception thrown, it just stops working.