This repository was archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
This repository was archived by the owner on Aug 18, 2020. It is now read-only.
Discord Connector: Massive Performance Issues #76
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededioRelies on a connector / input / output / parameterRelies on a connector / input / output / parameterminorQuick to implementQuick to implementurgentWhen something is more than just 'it's an open source project' importantWhen something is more than just 'it's an open source project' important
Milestone
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededioRelies on a connector / input / output / parameterRelies on a connector / input / output / parameterminorQuick to implementQuick to implementurgentWhen something is more than just 'it's an open source project' importantWhen something is more than just 'it's an open source project' important