Skip to content
Snippets Groups Projects
Commit ab380779 authored by Laurent Bachelier's avatar Laurent Bachelier Committed by Eric S. Raymond
Browse files

Use faster json if available

Considered faster according to:
http://stackoverflow.com/questions/712791/json-and-simplejson-module-differences-in-python
http://stackoverflow.com/questions/706101/python-json-decoding-performance



As a side-effect, it might make irker work under Python versions older than 2.6.

Signed-off-by: default avatarEric S. Raymond <esr@thyrsus.com>
parent 7cc47ab9
No related branches found
No related tags found
No related merge requests found
......@@ -58,9 +58,11 @@ except ImportError:
CONNECTION_MAX = 200
green_threads = False
import sys, json, getopt, urlparse, time, random
import sys, getopt, urlparse, time, random
import threading, Queue, SocketServer
import irc.client, logging
try: import simplejson as json
except ImportError: import json
version = "1.5"
......
......@@ -37,8 +37,10 @@ default_channels = "irc://chat.freenode.net/%(project)s,irc://chat.freenode.net/
# No user-serviceable parts below this line:
#
import os, sys, commands, socket, urllib, json
import os, sys, commands, socket, urllib
from pipes import quote as shellquote
try: import simplejson as json
except ImportError: import json
version = "1.5"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment