Drawing thousands of lines in WebGL or Canvas
As a first step instead of 20k graphics objects containing each a single line use a single graphics object and put the 20k lines in it



var container = new PIXI.Container(),
    i,
    renderer = PIXI.autoDetectRenderer(1000, 1000);
renderer.backgroundColor = 0xFFFFFF;
document.body.appendChild(renderer.view);

line = new PIXI.Graphics();
line.lineStyle(1, 0x888888, 1);
for (i = 0; i &lt; 5000; i++) {
    line.moveTo(0,0);
    line.lineTo(10*i,1000);
}
container.addChild(line);

renderer.render(container);
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/3.0.8/pixi.js"&gt;&lt;/script&gt;




PIXI will then batch all those lines into a single buffer and draw it using a single draw Elements command.