W
W
Wolf_Yout2021-07-29 21:01:28
Python
Wolf_Yout, 2021-07-29 21:01:28

How to improve bot performance?

I made a musical discord bot in Python Lags very much

The code did not fit, for the code go to the discord Mister Wolf # 2660

When playing, the music lags very much.
Is there any way to increase the power of the bot?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DollyPapper, 2021-07-29
@Wolf_Yout

First of all, no one will go to the discord to look at your code. Read about the rules for asking questions online. At a minimum, you should provide all the available information right away in the question, so that the answerers can give an answer, and not waste time navigating to some discord chats. By doing this, you will help yourself too, because a potential person who can give you an answer may simply not want to install discord.
As for your question:
1) The most banal thing is to increase the power of the iron where the bot is launched.
2) Use a profiler to determine the place in the code where the longest moment of computation occurs. You can use this for example
Do profiling, see which function takes the longest to complete (or maybe not a function, but a network request?) and come back with this question if you yourself don’t understand why this function takes so long to execute. And for God's sake, don't ask anyone to join your discord.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question