Skip to content
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
@sebinside

Description

@sebinside

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.

explosion

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

profiler

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 workinghelp wantedExtra attention is neededioRelies on a connector / input / output / parameterminorQuick to implementurgentWhen something is more than just 'it's an open source project' important

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions