From 77d1eda07478a566a45b022af61d51c84ac68279 Mon Sep 17 00:00:00 2001 From: "Vgr E.Barry" Date: Sun, 14 Jun 2015 23:13:49 -0400 Subject: [PATCH] Speed up startup time a bit _collections is the C implementation (and where defaultdict lies), and is as such already loaded when the interpreter is launched. collections imports a bunch of other useless stuff we're not interested in. --- src/decorators.py | 2 +- src/settings.py | 2 +- src/wolfgame.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decorators.py b/src/decorators.py index 082c8f4..fdf52f6 100644 --- a/src/decorators.py +++ b/src/decorators.py @@ -1,5 +1,5 @@ import fnmatch -from collections import defaultdict +from _collections import defaultdict import botconfig from oyoyo.parse import parse_nick diff --git a/src/settings.py b/src/settings.py index c65ebf0..6f2da48 100644 --- a/src/settings.py +++ b/src/settings.py @@ -1,4 +1,4 @@ -from collections import defaultdict +from _collections import defaultdict import math from src import events diff --git a/src/wolfgame.py b/src/wolfgame.py index 30f8dd8..c49e1b6 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -25,7 +25,7 @@ import botconfig import traceback from src import decorators from datetime import datetime, timedelta -from collections import defaultdict +from _collections import defaultdict import threading import copy import time