Skip to content

Optimise startup time#2662

Merged
ChrisLovering merged 5 commits into
mainfrom
optimise-startup-time
Jul 8, 2023
Merged

Optimise startup time#2662
ChrisLovering merged 5 commits into
mainfrom
optimise-startup-time

Conversation

@ChrisLovering
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering commented Jul 3, 2023

The 4 cogs that I have modified here were taking ~1 second to load. As only so many tasks can run at once, this slowed down startup time by a decent amount.

I approached this by loading each extension one at a time during startup and picking out the worst offenders.

BotBase.load_extentions now creates a task by default, so there's no need for us to do this too.
@ChrisLovering ChrisLovering force-pushed the optimise-startup-time branch from a7beb67 to cb62526 Compare July 3, 2023 21:42
Copy link
Copy Markdown
Contributor

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great.

Copy link
Copy Markdown
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good.

@ChrisLovering ChrisLovering merged commit 038baa7 into main Jul 8, 2023
@ChrisLovering ChrisLovering deleted the optimise-startup-time branch July 8, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants