Gist's requests take too much time respond on Ubuntu 12.04 #55

fupslot opened this Issue Nov 16, 2012 · 13 comments


None yet
4 participants

fupslot commented Nov 16, 2012

Hello All.

I ran into an issue.
On Ubuntu 12.04, Gist (the plugin) take to much time to respond. For example the command "Gist open" took 15 sec just to fetch the list of mine snippets and another 15 sec to fetch selected snippet, no matter what size of it 1kb or 100kb. That makes Gist almost useless to me, because it all about speed.

I blame the urllib2 python module, I believe I could :)
Within the terminal a simple following command executes about 10-15 sec:

import urllib2
response = urllib2.urlopen("") <-- this one

while an average ping to is 150ms. Thus, I have a question to you All, is there any similar library like urllib2 that Gist can work with? Or maybe same settings have to be set up. Or maybe same request caching has to be turned on, or.. anything else that I can do to boost it? I'm not an expert in Python, but any direction would be appreciated.

BTW. In Windows environment Gist works from out of the box pretty fast.


condemil commented Nov 16, 2012

In Ubuntu we use cURL because Sublime Text 2 not includes ssl for urllib2 in Linux version:

api_request = api_request_curl if ('ssl' not in sys.modules and != 'nt') else api_request_native

fupslot commented Nov 16, 2012

Is that means that on Linux it would always work slow?
Could be that module "SSL" be installed manualy?


condemil commented Nov 17, 2012

No, before it was fine. Maybe gist api is working slowly for you now, try this command in Ubuntu Terminal and check does it download gists slowly or not.


fupslot commented Nov 17, 2012

Here is a log for that command you have posted above.

--2012-11-17 10:58:44--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56676 (55K) [application/json]
Saving to: `gists'

100%[======================================>] 56,676 239K/s in 0.2s

2012-11-17 10:59:06 (239 KB/s) - `gists' saved [56676/56676]

22 sec. total.
Most of that time is spending on to establish a connection by https protocol. Probably it is a reason why it works slow.


condemil commented Nov 17, 2012

I don't know, why you have such issue with Ubuntu and HTTPS connections to GitHub API. You can try to ask this question on and

fupslot commented Nov 17, 2012

As I understood so far, somehow it related to Ubuntu's issue of the slow DNS resolving.

Also, few people mentioned that it could be due to IP6 wich is enabled by default in Ubuntu. I turned it off, didn't help.
Trying to find a fix solution...


condemil commented Feb 1, 2013

You found the solution?

fupslot commented Feb 4, 2013

No. I haven't found the solution. I kind of dealed with it.
All I understood that it related to system's network configuration. But, if you have an idea how to fix it I will listern it with pleasure.

I've got same issues as you guys.. here, this is mine timeing in console.. so baaaad :( 27sec

kreso@h17:~$ time wget
--2013-05-15 15:21:38--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 64669 (63K) [application/json]
Saving to: ‘gists.10’

100%[============================================================================================================================================================>] 64.669       214KB/s   in 0,3s   

2013-05-15 15:22:05 (214 KB/s) - ‘gists.10’ saved [64669/64669]

real    0m27.161s
user    0m0.004s
sys 0m0.008s

but the response time in chrome is similar to this 25sec.. I guess we can't get better response from this server, it's up gh slow delivery response .. right?


I had the same time response problem on Ubuntu 12.10, i've fixed it by passing thrue a proxy on another computer (analogX proxy for Windows).
What is surprising is that the same urllib2.urlopen.. works perfectly whell on win7


condemil commented Aug 24, 2013

@fupslot @FLambert88 maybe DNS is working a bit slow on your machines. You can try Google Public DNS or PowerDNS DNS server that can be configured to send the requests to different DNS servers simultaneously and use first response.

HAHAHA, this is crazy :)

this is my post from like year back... when I have configured google dns on my pc ,, but it's wrong!... whole this time??,, it's not 4444, its 8844,, I mean.. the second IP :)

look at my time now,, that's fast now! :)

kreso@h17:~$ time wget
--2013-08-26 22:40:19--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 62593 (61K) [application/json]
Saving to: ‘gists.1’

100%[============================================================================================================================================================>] 62.593       391KB/s   in 0,2s   

2013-08-26 22:40:20 (391 KB/s) - ‘gists.1’ saved [62593/62593]

real    0m1.204s
user    0m0.012s
sys 0m0.008s

little over 1sec! @condemil thanks for good tip and link in the right time.. (maybe Google only changed this second host ip,, ? who knows,, but now that speed issue is closed by me


condemil commented Aug 27, 2013

@mkdizajn it was as second IP from the beginning. You are welcome.

condemil closed this Aug 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment