Performance improvements

Instead of appending div by div, which is very intensive due to
reflows, a document fragment is created and the graph is apeended all
at once