Posts

Showing posts from October, 2014

Building and installing git 2.x on Windows

So Git 2.x has been out for a few months now and it came with some nice stuff, you can read more about it here However if you are under windows, the git portage msysgit has yet to release a 2.X portage(as of this writing the latest version is 1.9.4) If you want to install Git 2 on Windows you will need to build it from the source, and here is how it's done 1. Download the Git build environmentHead up to the Github page https://github.com/msysgit/msysgit and download the latest version from the master branch Unzip it let's say to c:/tmp/git/msygit-env2. Download the latest version of gitHead up to the Github page https://github.com/msysgit/git and download the latest version from the master branch Unzip it let's say to c:/tmp/git/git3. Copy the git folderNow copy the entire contents of the c:/tmp/git/git under c:/tmp/git/msygit-env/git4. Build GitNow you can fire up a DOS console and head up to the msysgit and build Git cd c:/tmp/git/msygit-env msys.bat Once the build s…

NodeJS, tune or disable HTTP agent pooling

When using NodeJS's HTTP module to query you might end-up having performance problems if you do some heavy HTTP querying.By default when executing queries using the HTTP module NodeJS will use connection pooling with the maximum number of connection sockets being 5, so if you hit the bottleneck your HTTP queries will lag as they will be queued. To my knowledge you have 2 options to "counter" this behavior : Increase the number of http sockets Disable the HTTP agent per request1. Increase the number of http sockets var http = require('http'); // increase the maximum number of http connections in the pool http.globalAgent.maxSockets = 100; //regular http request options var options = { port: 1337, hostname: '127.0.0.1', method: 'GET', path: '/test' }; // make http query var req = http.request(options, function(res) { console.log('STATUS: ' + res.statusCode); …