Skip to content

Instantly share code, notes, and snippets.

@miku
Last active December 8, 2018 03:43
Show Gist options
  • Save miku/47950c4abd90319ec85d to your computer and use it in GitHub Desktop.
Save miku/47950c4abd90319ec85d to your computer and use it in GitHub Desktop.
Golang XML worker queue example

Parallel XML processing

When working with large XML files, only a streaming approach is feasible, which also helps to work on the data in parallel, since only one record needs to be cosidered at a time.

First version of wikikit parsed the XML element in the main routine and the fan out the parsed struct to the workers. Thanks to pprof, it got clear, why this did not yield major speed improvements - most time was spent in converting a XML token into a struct.

Single routine, tokenization only

Needs about 6.268s to decode and parse 10000 XML elements.

Skipping struct parsing:

decoder := xml.NewDecoder(handle)
var inElement string

for {
	t, _ := decoder.Token()
	if t == nil {
		break
	}
	switch se := t.(type) {
	case xml.StartElement:
		inElement = se.Name.Local
		if inElement == "page" {
			// ...
		}
	default:
	}
}

gets the speed down to 0.433s. Just tokenizing through a 34G XML file with a single routine takes 39m21.517s saturating a single core.

Time distribution looks like this: https://cdn.mediacru.sh/DYyiKLBA7U2i.svg

Single routine, struct loading

decoder := xml.NewDecoder(handle)
var inElement string
var p Page

for {
	// Read tokens from the XML document in a stream.
	t, _ := decoder.Token()
	if t == nil {
		break
	}
	// Inspect the type of the token just read.
	switch se := t.(type) {
	case xml.StartElement:
		// If we just read a StartElement token
		inElement = se.Name.Local
		// ...and its name is "page"
		if inElement == "page" {
			// decode a whole chunk of following XML into the
			// variable p which is a Page (se above)
			decoder.DecodeElement(&p, &se)
		}
	default:
	}
}

Observation

Most time is spent actually getting the token out. DecodeElement is not unsignificant. Grepping for </page> in 34G takes finds 15671705 occurences and takes about 16m35.992s.

Distributing decoder.Token() among workers seems not that easy. Workaround could be to

  • split the file into N pieces, while preserving the XML structure,
  • write the N pieces to N files,
  • convert each file in a separate routine,
  • concatenate the result into a single file.
#!/usr/bin/env bash
go tool pprof --web xmlp $1
all:
go fmt xmlp.go
go build xmlp.go
clean:
rm -f xmlp
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.26.3 (20100126.1600)
-->
<!-- Title: xmlp; 193930 samples Pages: 1 -->
<svg width="100%" height="100%"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<script type="text/ecmascript"><![CDATA[
// SVGPan
// http://www.cyberz.org/blog/2009/12/08/svgpan-a-javascript-svg-panzoomdrag-library/
// Local modification: if(true || ...) below to force panning, never moving.
// Local modification: add clamping to fix bug in handleMouseWheel.
/**
* SVGPan library 1.2
* ====================
*
* Given an unique existing element with id "viewport", including the
* the library into any SVG adds the following capabilities:
*
* - Mouse panning
* - Mouse zooming (using the wheel)
* - Object dargging
*
* Known issues:
*
* - Zooming (while panning) on Safari has still some issues
*
* Releases:
*
* 1.2, Sat Mar 20 08:42:50 GMT 2010, Zeng Xiaohui
* Fixed a bug with browser mouse handler interaction
*
* 1.1, Wed Feb 3 17:39:33 GMT 2010, Zeng Xiaohui
* Updated the zoom code to support the mouse wheel on Safari/Chrome
*
* 1.0, Andrea Leofreddi
* First release
*
* This code is licensed under the following BSD license:
*
* Copyright 2009-2010 Andrea Leofreddi <a.leofreddi@itcharm.com>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY Andrea Leofreddi ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Andrea Leofreddi OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of Andrea Leofreddi.
*/
var root = document.documentElement;
var state = 'none', stateTarget, stateOrigin, stateTf;
setupHandlers(root);
/**
* Register handlers
*/
function setupHandlers(root){
setAttributes(root, {
"onmouseup" : "add(evt)",
"onmousedown" : "handleMouseDown(evt)",
"onmousemove" : "handleMouseMove(evt)",
"onmouseup" : "handleMouseUp(evt)",
//"onmouseout" : "handleMouseUp(evt)", // Decomment this to stop the pan functionality when dragging out of the SVG element
});
if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0)
window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari
else
window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
var g = svgDoc.getElementById("svg");
g.width = "100%";
g.height = "100%";
}
/**
* Instance an SVGPoint object with given event coordinates.
*/
function getEventPoint(evt) {
var p = root.createSVGPoint();
p.x = evt.clientX;
p.y = evt.clientY;
return p;
}
/**
* Sets the current transform matrix of an element.
*/
function setCTM(element, matrix) {
var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")";
element.setAttribute("transform", s);
}
/**
* Dumps a matrix to a string (useful for debug).
*/
function dumpMatrix(matrix) {
var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]";
return s;
}
/**
* Sets attributes of an element.
*/
function setAttributes(element, attributes){
for (i in attributes)
element.setAttributeNS(null, i, attributes[i]);
}
/**
* Handle mouse move event.
*/
function handleMouseWheel(evt) {
if(evt.preventDefault)
evt.preventDefault();
evt.returnValue = false;
var svgDoc = evt.target.ownerDocument;
var delta;
if(evt.wheelDelta)
delta = evt.wheelDelta / 3600; // Chrome/Safari
else
delta = evt.detail / -90; // Mozilla
var z = 1 + delta; // Zoom factor: 0.9/1.1
// Clamp to reasonable values.
// The 0.1 check is important because
// a very large scroll can turn into a
// negative z, which rotates the image 180 degrees.
if(z < 0.1)
z = 0.1;
if(z > 10.0)
z = 10.0;
var g = svgDoc.getElementById("viewport");
var p = getEventPoint(evt);
p = p.matrixTransform(g.getCTM().inverse());
// Compute new scale matrix in current mouse position
var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y);
setCTM(g, g.getCTM().multiply(k));
stateTf = stateTf.multiply(k.inverse());
}
/**
* Handle mouse move event.
*/
function handleMouseMove(evt) {
if(evt.preventDefault)
evt.preventDefault();
evt.returnValue = false;
var svgDoc = evt.target.ownerDocument;
var g = svgDoc.getElementById("viewport");
if(state == 'pan') {
// Pan mode
var p = getEventPoint(evt).matrixTransform(stateTf);
setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y));
} else if(state == 'move') {
// Move mode
var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse());
setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM()));
stateOrigin = p;
}
}
/**
* Handle click event.
*/
function handleMouseDown(evt) {
if(evt.preventDefault)
evt.preventDefault();
evt.returnValue = false;
var svgDoc = evt.target.ownerDocument;
var g = svgDoc.getElementById("viewport");
if(true || evt.target.tagName == "svg") {
// Pan mode
state = 'pan';
stateTf = g.getCTM().inverse();
stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
} else {
// Move mode
state = 'move';
stateTarget = evt.target;
stateTf = g.getCTM().inverse();
stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
}
}
/**
* Handle mouse button release event.
*/
function handleMouseUp(evt) {
if(evt.preventDefault)
evt.preventDefault();
evt.returnValue = false;
var svgDoc = evt.target.ownerDocument;
if(state == 'pan' || state == 'move') {
// Quit pan mode
state = '';
}
}
]]></script>
<g id="viewport" transform="translate(0,0)">
<g id="viewport" class="graph" transform="scale(1 1) rotate(0) translate(4 1730)">
<title>xmlp; 193930 samples</title>
<polygon fill="white" stroke="white" points="-4,5 -4,-1730 2361,-1730 2361,5 -4,5"/>
<!-- Legend -->
<g id="node1" class="node"><title>Legend</title>
<text text-anchor="start" x="626.5" y="-1699.9" font-family="Times Roman,serif" font-size="24.00">xmlp</text>
<text text-anchor="start" x="626.5" y="-1670.9" font-family="Times Roman,serif" font-size="24.00">Total samples: 193930</text>
<text text-anchor="start" x="626.5" y="-1641.9" font-family="Times Roman,serif" font-size="24.00">Focusing on: 193930</text>
<text text-anchor="start" x="626.5" y="-1612.9" font-family="Times Roman,serif" font-size="24.00">Dropped nodes with &lt;= 969 abs(samples)</text>
<text text-anchor="start" x="626.5" y="-1583.9" font-family="Times Roman,serif" font-size="24.00">Dropped edges with &lt;= 193 samples</text>
</g>
<!-- N1 -->
<g id="node2" class="node"><title>N1</title>
<polygon fill="none" stroke="black" points="1257,-1669.5 1163,-1669.5 1163,-1628.5 1257,-1628.5 1257,-1669.5"/>
<text text-anchor="middle" x="1210" y="-1658.21" font-family="Times Roman,serif" font-size="8.10">runtime.gosched0</text>
<text text-anchor="end" x="1249.5" y="-1647.21" font-family="Times Roman,serif" font-size="8.10">1 (0.0%)</text>
<text text-anchor="end" x="1249.5" y="-1636.21" font-family="Times Roman,serif" font-size="8.10">of 185014 (95.4%)</text>
</g>
<!-- N3 -->
<g id="node4" class="node"><title>N3</title>
<polygon fill="none" stroke="black" points="1257,-1510 1163,-1510 1163,-1472 1257,-1472 1257,-1510"/>
<text text-anchor="middle" x="1210" y="-1498.8" font-family="Times Roman,serif" font-size="8.00">runtime.main</text>
<text text-anchor="end" x="1249.5" y="-1488.8" font-family="Times Roman,serif" font-size="8.00">0 (0.0%)</text>
<text text-anchor="end" x="1249.5" y="-1478.8" font-family="Times Roman,serif" font-size="8.00">of 185013 (95.4%)</text>
</g>
<!-- N1&#45;&gt;N3 -->
<g id="edge134" class="edge"><title>N1&#45;&gt;N3</title>
<path fill="none" stroke="black" stroke-width="2" d="M1210,-1628.34C1210,-1600.81 1210,-1551.91 1210,-1520.49"/>
<polygon fill="black" stroke="black" points="1213.5,-1520.18 1210,-1510.18 1206.5,-1520.18 1213.5,-1520.18"/>
<text text-anchor="middle" x="1237.5" y="-1541.4" font-family="Times Roman,serif" font-size="14.00">185013</text>
</g>
<!-- N2 -->
<g id="node3" class="node"><title>N2</title>
<polygon fill="none" stroke="black" points="1266,-1410 1154,-1410 1154,-1360 1266,-1360 1266,-1410"/>
<text text-anchor="middle" x="1210" y="-1396.37" font-family="Times Roman,serif" font-size="10.70">main.main</text>
<text text-anchor="end" x="1258.5" y="-1382.37" font-family="Times Roman,serif" font-size="10.70">557 (0.3%)</text>
<text text-anchor="end" x="1258.5" y="-1368.37" font-family="Times Roman,serif" font-size="10.70">of 185013 (95.4%)</text>
</g>
<!-- N4 -->
<g id="node5" class="node"><title>N4</title>
<polygon fill="none" stroke="black" points="1316,-1305.5 1104,-1305.5 1104,-1246.5 1316,-1246.5 1316,-1305.5"/>
<text text-anchor="middle" x="1210" y="-1289.8" font-family="Times Roman,serif" font-size="13.00">encoding/xml.(*Decoder).Token</text>
<text text-anchor="end" x="1308.5" y="-1272.8" font-family="Times Roman,serif" font-size="13.00">1902 (1.0%)</text>
<text text-anchor="end" x="1308.5" y="-1255.8" font-family="Times Roman,serif" font-size="13.00">of 184056 (94.9%)</text>
</g>
<!-- N2&#45;&gt;N4 -->
<g id="edge122" class="edge"><title>N2&#45;&gt;N4</title>
<path fill="none" stroke="black" stroke-width="2" d="M1210,-1359.99C1210,-1346.94 1210,-1330.67 1210,-1315.93"/>
<polygon fill="black" stroke="black" points="1213.5,-1315.53 1210,-1305.53 1206.5,-1315.53 1213.5,-1315.53"/>
<text text-anchor="middle" x="1237.5" y="-1329.4" font-family="Times Roman,serif" font-size="14.00">184056</text>
</g>
<!-- N3&#45;&gt;N2 -->
<g id="edge2" class="edge"><title>N3&#45;&gt;N2</title>
<path fill="none" stroke="black" stroke-width="2" d="M1210,-1471.56C1210,-1457.3 1210,-1437.55 1210,-1420.51"/>
<polygon fill="black" stroke="black" points="1213.5,-1420.32 1210,-1410.32 1206.5,-1420.32 1213.5,-1420.32"/>
<text text-anchor="middle" x="1237.5" y="-1433.4" font-family="Times Roman,serif" font-size="14.00">185013</text>
</g>
<!-- N5 -->
<g id="node6" class="node"><title>N5</title>
<polygon fill="none" stroke="black" points="1336,-1192 1084,-1192 1084,-1130 1336,-1130 1336,-1192"/>
<text text-anchor="middle" x="1210" y="-1175.58" font-family="Times Roman,serif" font-size="13.80">encoding/xml.(*Decoder).rawToken</text>
<text text-anchor="end" x="1328" y="-1157.58" font-family="Times Roman,serif" font-size="13.80">2628 (1.4%)</text>
<text text-anchor="end" x="1328" y="-1139.58" font-family="Times Roman,serif" font-size="13.80">of 176481 (91.0%)</text>
</g>
<!-- N4&#45;&gt;N5 -->
<g id="edge34" class="edge"><title>N4&#45;&gt;N5</title>
<path fill="none" stroke="black" stroke-width="2" d="M1210,-1246.38C1210,-1233 1210,-1216.95 1210,-1202.4"/>
<polygon fill="black" stroke="black" points="1213.5,-1202.12 1210,-1192.12 1206.5,-1202.12 1213.5,-1202.12"/>
<text text-anchor="middle" x="1237.5" y="-1215.4" font-family="Times Roman,serif" font-size="14.00">176481</text>
</g>
<!-- N23 -->
<g id="node24" class="node"><title>N23</title>
<polygon fill="none" stroke="black" points="954,-1075.5 844,-1075.5 844,-1022.5 954,-1022.5 954,-1075.5"/>
<text text-anchor="middle" x="899" y="-1061.15" font-family="Times Roman,serif" font-size="11.50">runtime.convT2E</text>
<text text-anchor="end" x="946" y="-1046.15" font-family="Times Roman,serif" font-size="11.50">963 (0.5%)</text>
<text text-anchor="end" x="946" y="-1031.15" font-family="Times Roman,serif" font-size="11.50">of 6839 (3.5%)</text>
</g>
<!-- N4&#45;&gt;N23 -->
<g id="edge96" class="edge"><title>N4&#45;&gt;N23</title>
<path fill="none" stroke="black" d="M1135.29,-1246.32C1103.85,-1232.14 1067.74,-1213.54 1038,-1192 1014.7,-1175.12 963.08,-1119.9 929.723,-1083.23"/>
<polygon fill="black" stroke="black" points="932.21,-1080.76 922.899,-1075.7 927.025,-1085.46 932.21,-1080.76"/>
<text text-anchor="middle" x="1056.5" y="-1157.4" font-family="Times Roman,serif" font-size="14.00">2147</text>
</g>
<!-- N48 -->
<g id="node49" class="node"><title>N48</title>
<polygon fill="none" stroke="black" points="1548,-1186 1354,-1186 1354,-1136 1548,-1136 1548,-1186"/>
<text text-anchor="middle" x="1451" y="-1172.46" font-family="Times Roman,serif" font-size="10.60">encoding/xml.(*Decoder).translate</text>
<text text-anchor="end" x="1540.5" y="-1158.46" font-family="Times Roman,serif" font-size="10.60">523 (0.3%)</text>
<text text-anchor="end" x="1540.5" y="-1144.46" font-family="Times Roman,serif" font-size="10.60">of 1018 (0.5%)</text>
</g>
<!-- N4&#45;&gt;N48 -->
<g id="edge100" class="edge"><title>N4&#45;&gt;N48</title>
<path fill="none" stroke="black" d="M1272.06,-1246.38C1308.04,-1229.22 1353.18,-1207.68 1389.13,-1190.53"/>
<polygon fill="black" stroke="black" points="1391.01,-1193.5 1398.53,-1186.04 1388,-1187.19 1391.01,-1193.5"/>
<text text-anchor="middle" x="1362.5" y="-1215.4" font-family="Times Roman,serif" font-size="14.00">1018</text>
</g>
<!-- N49 -->
<g id="node50" class="node"><title>N49</title>
<polygon fill="none" stroke="black" points="960,-1181.5 880,-1181.5 880,-1140.5 960,-1140.5 960,-1181.5"/>
<text text-anchor="middle" x="920" y="-1169.67" font-family="Times Roman,serif" font-size="8.70">runtime.new</text>
<text text-anchor="end" x="952" y="-1158.67" font-family="Times Roman,serif" font-size="8.70">33 (0.0%)</text>
<text text-anchor="end" x="952" y="-1147.67" font-family="Times Roman,serif" font-size="8.70">of 982 (0.5%)</text>
</g>
<!-- N4&#45;&gt;N49 -->
<g id="edge124" class="edge"><title>N4&#45;&gt;N49</title>
<path fill="none" stroke="black" d="M1103.79,-1265.59C1044.43,-1257.96 977.744,-1245.8 954,-1228 942.024,-1219.02 933.953,-1204.63 928.692,-1191.48"/>
<polygon fill="black" stroke="black" points="931.88,-1190.01 925.199,-1181.78 925.294,-1192.38 931.88,-1190.01"/>
<text text-anchor="middle" x="968" y="-1215.4" font-family="Times Roman,serif" font-size="14.00">982</text>
</g>
<!-- N6 -->
<g id="node7" class="node"><title>N6</title>
<polygon fill="none" stroke="black" points="1414,-968 1006,-968 1006,-864 1414,-864 1414,-968"/>
<text text-anchor="middle" x="1210" y="-940.6" font-family="Times Roman,serif" font-size="26.00">encoding/xml.(*Decoder).text</text>
<text text-anchor="end" x="1406" y="-908.6" font-family="Times Roman,serif" font-size="26.00">25111 (12.9%)</text>
<text text-anchor="end" x="1406" y="-876.6" font-family="Times Roman,serif" font-size="26.00">of 143895 (74.2%)</text>
</g>
<!-- N5&#45;&gt;N6 -->
<g id="edge50" class="edge"><title>N5&#45;&gt;N6</title>
<path fill="none" stroke="black" stroke-width="2" d="M1210,-1129.97C1210,-1091.98 1210,-1026.73 1210,-978.249"/>
<polygon fill="black" stroke="black" points="1213.5,-978.174 1210,-968.174 1206.5,-978.174 1213.5,-978.174"/>
<text text-anchor="middle" x="1237.5" y="-1045.4" font-family="Times Roman,serif" font-size="14.00">143482</text>
</g>
<!-- N8 -->
<g id="node9" class="node"><title>N8</title>
<polygon fill="none" stroke="black" points="2356,-534 1988,-534 1988,-442 2356,-442 2356,-534"/>
<text text-anchor="middle" x="2172" y="-509.21" font-family="Times Roman,serif" font-size="23.10">encoding/xml.(*Decoder).getc</text>
<text text-anchor="end" x="2348.5" y="-481.21" font-family="Times Roman,serif" font-size="23.10">17657 (9.1%)</text>
<text text-anchor="end" x="2348.5" y="-453.21" font-family="Times Roman,serif" font-size="23.10">of 32654 (16.8%)</text>
</g>
<!-- N5&#45;&gt;N8 -->
<g id="edge102" class="edge"><title>N5&#45;&gt;N8</title>
<path fill="none" stroke="black" d="M1336.34,-1131.21C1339.25,-1130.78 1342.14,-1130.37 1345,-1130 1463.62,-1114.54 1767.77,-1144.13 1883,-1112 2054.73,-1064.11 2233,-1094.29 2233,-916 2233,-916 2233,-916 2233,-636 2233,-603.541 2220.3,-569.893 2206.49,-542.898"/>
<polygon fill="black" stroke="black" points="2209.56,-541.207 2201.79,-534.009 2203.37,-544.484 2209.56,-541.207"/>
<text text-anchor="middle" x="2247" y="-833.4" font-family="Times Roman,serif" font-size="14.00">761</text>
</g>
<!-- N12 -->
<g id="node13" class="node"><title>N12</title>
<polygon fill="none" stroke="black" points="1174,-1074 972,-1074 972,-1024 1174,-1024 1174,-1074"/>
<text text-anchor="middle" x="1073" y="-1060.19" font-family="Times Roman,serif" font-size="10.90">encoding/xml.(*Decoder).nsname</text>
<text text-anchor="end" x="1166.5" y="-1046.19" font-family="Times Roman,serif" font-size="10.90">653 (0.3%)</text>
<text text-anchor="end" x="1166.5" y="-1032.19" font-family="Times Roman,serif" font-size="10.90">of 20519 (10.6%)</text>
</g>
<!-- N5&#45;&gt;N12 -->
<g id="edge88" class="edge"><title>N5&#45;&gt;N12</title>
<path fill="none" stroke="black" d="M1171.91,-1129.9C1164.63,-1123.96 1157.08,-1117.79 1150,-1112 1137.49,-1101.78 1123.85,-1090.62 1111.57,-1080.57"/>
<polygon fill="black" stroke="black" points="1113.68,-1077.77 1103.72,-1074.14 1109.24,-1083.19 1113.68,-1077.77"/>
<text text-anchor="middle" x="1173" y="-1099.4" font-family="Times Roman,serif" font-size="14.00">20519</text>
</g>
<!-- N14 -->
<g id="node15" class="node"><title>N14</title>
<polygon fill="none" stroke="black" points="1988,-668.5 1708,-668.5 1708,-603.5 1988,-603.5 1988,-668.5"/>
<text text-anchor="middle" x="1848" y="-651.18" font-family="Times Roman,serif" font-size="14.80">encoding/xml.(*Decoder).mustgetc</text>
<text text-anchor="end" x="1980.5" y="-632.18" font-family="Times Roman,serif" font-size="14.80">3548 (1.8%)</text>
<text text-anchor="end" x="1980.5" y="-613.18" font-family="Times Roman,serif" font-size="14.80">of 16743 (8.6%)</text>
</g>
<!-- N5&#45;&gt;N14 -->
<g id="edge32" class="edge"><title>N5&#45;&gt;N14</title>
<path fill="none" stroke="black" d="M1336.04,-1131.7C1339.06,-1131.11 1342.04,-1130.55 1345,-1130 1471.45,-1106.59 1918,-1177.6 1918,-1049 1918,-1049 1918,-1049 1918,-774 1918,-738.487 1899.33,-702.853 1881.28,-676.692"/>
<polygon fill="black" stroke="black" points="1884.12,-674.65 1875.46,-668.544 1878.43,-678.717 1884.12,-674.65"/>
<text text-anchor="middle" x="1932" y="-912.4" font-family="Times Roman,serif" font-size="14.00">986</text>
</g>
<!-- N5&#45;&gt;N23 -->
<g id="edge8" class="edge"><title>N5&#45;&gt;N23</title>
<path fill="none" stroke="black" d="M1120.8,-1129.86C1109.11,-1124.52 1097.54,-1118.55 1087,-1112 1076.84,-1105.69 1077.76,-1099.22 1067,-1094 1027.44,-1074.79 1010.21,-1087.38 963.889,-1075.85"/>
<polygon fill="black" stroke="black" points="964.791,-1072.47 954.222,-1073.21 962.944,-1079.22 964.791,-1072.47"/>
<text text-anchor="middle" x="1105.5" y="-1099.4" font-family="Times Roman,serif" font-size="14.00">4692</text>
</g>
<!-- N37 -->
<g id="node38" class="node"><title>N37</title>
<polygon fill="none" stroke="black" points="826,-1074 716,-1074 716,-1024 826,-1024 826,-1074"/>
<text text-anchor="middle" x="771" y="-1060.37" font-family="Times Roman,serif" font-size="10.70">runtime.makeslice</text>
<text text-anchor="end" x="818.5" y="-1046.37" font-family="Times Roman,serif" font-size="10.70">555 (0.3%)</text>
<text text-anchor="end" x="818.5" y="-1032.37" font-family="Times Roman,serif" font-size="10.70">of 2551 (1.3%)</text>
</g>
<!-- N5&#45;&gt;N37 -->
<g id="edge108" class="edge"><title>N5&#45;&gt;N37</title>
<path fill="none" stroke="black" d="M1083.94,-1138.2C1013.05,-1124 923.087,-1103.69 835.806,-1076.07"/>
<polygon fill="black" stroke="black" points="836.868,-1072.74 826.277,-1073.02 834.735,-1079.4 836.868,-1072.74"/>
<text text-anchor="middle" x="976.5" y="-1099.4" font-family="Times Roman,serif" font-size="14.00">2550</text>
</g>
<!-- N7 -->
<g id="node8" class="node"><title>N7</title>
<polygon fill="none" stroke="black" points="1690,-683.5 1370,-683.5 1370,-588.5 1690,-588.5 1690,-683.5"/>
<text text-anchor="middle" x="1530" y="-657.99" font-family="Times Roman,serif" font-size="23.90">bytes.(*Buffer).WriteByte</text>
<text text-anchor="end" x="1682.5" y="-628.99" font-family="Times Roman,serif" font-size="23.90">19618 (10.1%)</text>
<text text-anchor="end" x="1682.5" y="-599.99" font-family="Times Roman,serif" font-size="23.90">of 34889 (18.0%)</text>
</g>
<!-- N6&#45;&gt;N7 -->
<g id="edge56" class="edge"><title>N6&#45;&gt;N7</title>
<path fill="none" stroke="black" d="M1414.13,-875.976C1482.71,-858.436 1547.55,-835.913 1570,-810 1601.66,-773.461 1599.05,-747.606 1583,-702 1581.9,-698.881 1580.59,-695.8 1579.1,-692.775"/>
<polygon fill="black" stroke="black" points="1582.09,-690.944 1574.19,-683.885 1575.97,-694.33 1582.09,-690.944"/>
<text text-anchor="middle" x="1617" y="-770.4" font-family="Times Roman,serif" font-size="14.00">23880</text>
</g>
<!-- N6&#45;&gt;N8 -->
<g id="edge90" class="edge"><title>N6&#45;&gt;N8</title>
<path fill="none" stroke="black" d="M1414.04,-899.812C1683.77,-877.437 2128.1,-836.793 2153,-810 2170.61,-791.055 2172.7,-631.766 2172.5,-544.555"/>
<polygon fill="black" stroke="black" points="2176,-544.279 2172.46,-534.291 2169,-544.303 2176,-544.279"/>
<text text-anchor="middle" x="2192" y="-707.4" font-family="Times Roman,serif" font-size="14.00">18491</text>
</g>
<!-- N9 -->
<g id="node10" class="node"><title>N9</title>
<polygon fill="none" stroke="black" points="1561,-809.5 1249,-809.5 1249,-738.5 1561,-738.5 1561,-809.5"/>
<text text-anchor="middle" x="1405" y="-790.56" font-family="Times Roman,serif" font-size="16.60">encoding/xml.(*Decoder).readName</text>
<text text-anchor="end" x="1553.5" y="-769.56" font-family="Times Roman,serif" font-size="16.60">5703 (2.9%)</text>
<text text-anchor="end" x="1553.5" y="-748.56" font-family="Times Roman,serif" font-size="16.60">of 29177 (15.0%)</text>
</g>
<!-- N6&#45;&gt;N9 -->
<g id="edge4" class="edge"><title>N6&#45;&gt;N9</title>
<path fill="none" stroke="black" d="M1281.5,-863.931C1303.38,-847.999 1327.14,-830.694 1347.93,-815.559"/>
<polygon fill="black" stroke="black" points="1350.01,-818.371 1356.04,-809.655 1345.89,-812.712 1350.01,-818.371"/>
<text text-anchor="middle" x="1353" y="-833.4" font-family="Times Roman,serif" font-size="14.00">21170</text>
</g>
<!-- N10 -->
<g id="node11" class="node"><title>N10</title>
<polygon fill="none" stroke="black" points="1004,-806.5 824,-806.5 824,-741.5 1004,-741.5 1004,-806.5"/>
<text text-anchor="middle" x="914" y="-789.09" font-family="Times Roman,serif" font-size="14.90">encoding/xml.isName</text>
<text text-anchor="end" x="996" y="-770.09" font-family="Times Roman,serif" font-size="14.90">3739 (1.9%)</text>
<text text-anchor="end" x="996" y="-751.09" font-family="Times Roman,serif" font-size="14.90">of 23924 (12.3%)</text>
</g>
<!-- N6&#45;&gt;N10 -->
<g id="edge136" class="edge"><title>N6&#45;&gt;N10</title>
<path fill="none" stroke="black" d="M1110.46,-863.9C1099.78,-857.983 1089.12,-851.942 1079,-846 1066.24,-838.508 1064.17,-834.745 1051,-828 1039.01,-821.857 1026.15,-815.954 1013.28,-810.453"/>
<polygon fill="black" stroke="black" points="1014.5,-807.169 1003.92,-806.521 1011.79,-813.622 1014.5,-807.169"/>
<text text-anchor="middle" x="1102" y="-833.4" font-family="Times Roman,serif" font-size="14.00">17433</text>
</g>
<!-- N6&#45;&gt;N14 -->
<g id="edge80" class="edge"><title>N6&#45;&gt;N14</title>
<path fill="none" stroke="black" d="M1414.11,-883.401C1508.43,-864.942 1607.54,-839.621 1644,-810 1673.11,-786.351 1661.73,-764.769 1688,-738 1712.78,-712.748 1744.92,-690.733 1773.89,-673.683"/>
<polygon fill="black" stroke="black" points="1775.86,-676.586 1782.77,-668.552 1772.36,-670.525 1775.86,-676.586"/>
<text text-anchor="middle" x="1706.5" y="-770.4" font-family="Times Roman,serif" font-size="14.00">3280</text>
</g>
<!-- N18 -->
<g id="node19" class="node"><title>N18</title>
<polygon fill="none" stroke="black" points="1283,-673 1041,-673 1041,-599 1283,-599 1283,-673"/>
<text text-anchor="middle" x="1162" y="-653.52" font-family="Times Roman,serif" font-size="17.20">unicode/utf8.DecodeRune</text>
<text text-anchor="end" x="1275" y="-631.52" font-family="Times Roman,serif" font-size="17.20">6529 (3.4%)</text>
<text text-anchor="end" x="1275" y="-609.52" font-family="Times Roman,serif" font-size="17.20">of 13338 (6.9%)</text>
</g>
<!-- N6&#45;&gt;N18 -->
<g id="edge14" class="edge"><title>N6&#45;&gt;N18</title>
<path fill="none" stroke="black" d="M1201.08,-863.99C1192.21,-812.205 1178.7,-733.408 1170.11,-683.329"/>
<polygon fill="black" stroke="black" points="1173.55,-682.671 1168.41,-673.406 1166.65,-683.853 1173.55,-682.671"/>
<text text-anchor="middle" x="1209.5" y="-770.4" font-family="Times Roman,serif" font-size="14.00">8113</text>
</g>
<!-- N21 -->
<g id="node22" class="node"><title>N21</title>
<polygon fill="none" stroke="black" points="688,-799 536,-799 536,-749 688,-749 688,-799"/>
<text text-anchor="middle" x="612" y="-785.01" font-family="Times Roman,serif" font-size="11.10">runtime.slicebytetostring</text>
<text text-anchor="end" x="680" y="-771.01" font-family="Times Roman,serif" font-size="11.10">760 (0.4%)</text>
<text text-anchor="end" x="680" y="-757.01" font-family="Times Roman,serif" font-size="11.10">of 9068 (4.7%)</text>
</g>
<!-- N6&#45;&gt;N21 -->
<g id="edge40" class="edge"><title>N6&#45;&gt;N21</title>
<path fill="none" stroke="black" d="M1005.89,-864.305C978.211,-856.545 956.882,-849.856 950,-846 939.852,-840.314 941.633,-832.717 931,-828 835.655,-785.699 798.35,-834.662 697,-810 689.14,-808.087 681.075,-805.529 673.191,-802.655"/>
<polygon fill="black" stroke="black" points="674.281,-799.324 663.691,-799.014 671.776,-805.861 674.281,-799.324"/>
<text text-anchor="middle" x="968.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">7313</text>
</g>
<!-- N24 -->
<g id="node25" class="node"><title>N24</title>
<polygon fill="none" stroke="black" points="518,-799 374,-799 374,-749 518,-749 518,-799"/>
<text text-anchor="middle" x="446" y="-785.37" font-family="Times Roman,serif" font-size="10.70">runtime.stringtoslicebyte</text>
<text text-anchor="end" x="510.5" y="-771.37" font-family="Times Roman,serif" font-size="10.70">566 (0.3%)</text>
<text text-anchor="end" x="510.5" y="-757.37" font-family="Times Roman,serif" font-size="10.70">of 6812 (3.5%)</text>
</g>
<!-- N6&#45;&gt;N24 -->
<g id="edge16" class="edge"><title>N6&#45;&gt;N24</title>
<path fill="none" stroke="black" d="M1005.76,-865.616C1002.83,-865.062 999.903,-864.523 997,-864 929.616,-851.858 909.242,-866.771 844,-846 828.081,-840.932 827.05,-832.638 811,-828 689.496,-792.887 649.828,-840.157 527,-810 519.539,-808.168 511.908,-805.682 504.456,-802.866"/>
<polygon fill="black" stroke="black" points="505.725,-799.604 495.14,-799.147 503.13,-806.105 505.725,-799.604"/>
<text text-anchor="middle" x="862.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">5487</text>
</g>
<!-- N26 -->
<g id="node27" class="node"><title>N26</title>
<polygon fill="none" stroke="black" points="806,-799 706,-799 706,-749 806,-749 806,-799"/>
<text text-anchor="middle" x="756" y="-785.37" font-family="Times Roman,serif" font-size="10.70">runtime.intstring</text>
<text text-anchor="end" x="798.5" y="-771.37" font-family="Times Roman,serif" font-size="10.70">555 (0.3%)</text>
<text text-anchor="end" x="798.5" y="-757.37" font-family="Times Roman,serif" font-size="10.70">of 6519 (3.4%)</text>
</g>
<!-- N6&#45;&gt;N26 -->
<g id="edge22" class="edge"><title>N6&#45;&gt;N26</title>
<path fill="none" stroke="black" d="M1043.48,-863.944C1031.88,-858.439 1020.6,-852.463 1010,-846 1000.07,-839.945 1001.57,-832.851 991,-828 919.533,-795.211 889.517,-835.099 815,-810 810.149,-808.366 805.277,-806.277 800.525,-803.93"/>
<polygon fill="black" stroke="black" points="802.042,-800.773 791.572,-799.151 798.746,-806.948 802.042,-800.773"/>
<text text-anchor="middle" x="1028.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">6519</text>
</g>
<!-- N34 -->
<g id="node35" class="node"><title>N34</title>
<polygon fill="none" stroke="black" points="2144,-803.5 1946,-803.5 1946,-744.5 2144,-744.5 2144,-803.5"/>
<text text-anchor="middle" x="2045" y="-787.26" font-family="Times Roman,serif" font-size="13.60">runtime.mapaccess2_faststr</text>
<text text-anchor="end" x="2136.5" y="-770.26" font-family="Times Roman,serif" font-size="13.60">2470 (1.3%)</text>
<text text-anchor="end" x="2136.5" y="-753.26" font-family="Times Roman,serif" font-size="13.60">of 3742 (1.9%)</text>
</g>
<!-- N6&#45;&gt;N34 -->
<g id="edge6" class="edge"><title>N6&#45;&gt;N34</title>
<path fill="none" stroke="black" d="M1414.17,-896.276C1518.94,-884.609 1648.32,-867.81 1763,-846 1820.59,-835.046 1883.9,-819.233 1935.92,-805.214"/>
<polygon fill="black" stroke="black" points="1937.1,-808.521 1945.84,-802.527 1935.27,-801.765 1937.1,-808.521"/>
<text text-anchor="middle" x="1859.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">3325</text>
</g>
<!-- N36 -->
<g id="node37" class="node"><title>N36</title>
<polygon fill="none" stroke="black" points="1158,-800.5 1022,-800.5 1022,-747.5 1158,-747.5 1158,-800.5"/>
<text text-anchor="middle" x="1090" y="-785.88" font-family="Times Roman,serif" font-size="11.80">bytes.(*Buffer).Write</text>
<text text-anchor="end" x="1150.5" y="-770.88" font-family="Times Roman,serif" font-size="11.80">1142 (0.6%)</text>
<text text-anchor="end" x="1150.5" y="-755.88" font-family="Times Roman,serif" font-size="11.80">of 2756 (1.4%)</text>
</g>
<!-- N6&#45;&gt;N36 -->
<g id="edge86" class="edge"><title>N6&#45;&gt;N36</title>
<path fill="none" stroke="black" d="M1158.76,-863.926C1153.33,-857.978 1147.98,-851.923 1143,-846 1133.19,-834.336 1123.12,-821.03 1114.41,-809.056"/>
<polygon fill="black" stroke="black" points="1117.03,-806.691 1108.35,-800.615 1111.34,-810.778 1117.03,-806.691"/>
<text text-anchor="middle" x="1161.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">2756</text>
</g>
<!-- N44 -->
<g id="node45" class="node"><title>N44</title>
<polygon fill="none" stroke="black" points="1890,-793 1734,-793 1734,-755 1890,-755 1890,-793"/>
<text text-anchor="middle" x="1812" y="-778.29" font-family="Times Roman,serif" font-size="11.90">bytes.(*Buffer).Truncate</text>
<text text-anchor="end" x="1882.5" y="-763.29" font-family="Times Roman,serif" font-size="11.90">1209 (0.6%)</text>
</g>
<!-- N6&#45;&gt;N44 -->
<g id="edge44" class="edge"><title>N6&#45;&gt;N44</title>
<path fill="none" stroke="black" d="M1414.16,-894.603C1521.91,-881.687 1642.1,-864.236 1693,-846 1724.04,-834.879 1755.83,-815.136 1778.73,-799.133"/>
<polygon fill="black" stroke="black" points="1780.93,-801.859 1787.05,-793.209 1776.88,-796.157 1780.93,-801.859"/>
<text text-anchor="middle" x="1745" y="-833.4" font-family="Times Roman,serif" font-size="14.00">653</text>
</g>
<!-- N15 -->
<g id="node16" class="node"><title>N15</title>
<polygon fill="none" stroke="black" points="1653,-534 1407,-534 1407,-442 1653,-442 1653,-534"/>
<text text-anchor="middle" x="1530" y="-509.84" font-family="Times Roman,serif" font-size="22.40">bytes.(*Buffer).grow</text>
<text text-anchor="end" x="1645" y="-481.84" font-family="Times Roman,serif" font-size="22.40">16125 (8.3%)</text>
<text text-anchor="end" x="1645" y="-453.84" font-family="Times Roman,serif" font-size="22.40">of 16126 (8.3%)</text>
</g>
<!-- N7&#45;&gt;N15 -->
<g id="edge128" class="edge"><title>N7&#45;&gt;N15</title>
<path fill="none" stroke="black" d="M1530,-588.357C1530,-574.35 1530,-558.893 1530,-544.393"/>
<polygon fill="black" stroke="black" points="1533.5,-544.039 1530,-534.039 1526.5,-544.039 1533.5,-544.039"/>
<text text-anchor="middle" x="1553" y="-557.4" font-family="Times Roman,serif" font-size="14.00">15271</text>
</g>
<!-- N16 -->
<g id="node17" class="node"><title>N16</title>
<polygon fill="none" stroke="black" points="2318,-387.5 2026,-387.5 2026,-298.5 2318,-298.5 2318,-387.5"/>
<text text-anchor="middle" x="2172" y="-363.79" font-family="Times Roman,serif" font-size="21.90">bufio.(*Reader).ReadByte</text>
<text text-anchor="end" x="2310.5" y="-336.79" font-family="Times Roman,serif" font-size="21.90">14901 (7.7%)</text>
<text text-anchor="end" x="2310.5" y="-309.79" font-family="Times Roman,serif" font-size="21.90">of 14997 (7.7%)</text>
</g>
<!-- N8&#45;&gt;N16 -->
<g id="edge116" class="edge"><title>N8&#45;&gt;N16</title>
<path fill="none" stroke="black" d="M2172,-441.722C2172,-427.85 2172,-412.498 2172,-398.115"/>
<polygon fill="black" stroke="black" points="2175.5,-397.849 2172,-387.849 2168.5,-397.849 2175.5,-397.849"/>
<text text-anchor="middle" x="2195" y="-411.4" font-family="Times Roman,serif" font-size="14.00">14997</text>
</g>
<!-- N9&#45;&gt;N7 -->
<g id="edge114" class="edge"><title>N9&#45;&gt;N7</title>
<path fill="none" stroke="black" d="M1425.31,-738.473C1432.97,-726.354 1442.22,-713.077 1452,-702 1455.36,-698.192 1458.95,-694.41 1462.67,-690.696"/>
<polygon fill="black" stroke="black" points="1465.2,-693.115 1469.96,-683.647 1460.34,-688.083 1465.2,-693.115"/>
<text text-anchor="middle" x="1475" y="-707.4" font-family="Times Roman,serif" font-size="14.00">11009</text>
</g>
<!-- N9&#45;&gt;N14 -->
<g id="edge72" class="edge"><title>N9&#45;&gt;N14</title>
<path fill="none" stroke="black" d="M1503.69,-738.423C1539.73,-726.064 1580.97,-712.646 1619,-702 1654.1,-692.176 1663.84,-693.597 1699,-684 1712.85,-680.22 1727.32,-675.957 1741.58,-671.571"/>
<polygon fill="black" stroke="black" points="1742.89,-674.829 1751.4,-668.519 1740.81,-668.144 1742.89,-674.829"/>
<text text-anchor="middle" x="1642" y="-707.4" font-family="Times Roman,serif" font-size="14.00">12465</text>
</g>
<!-- N17 -->
<g id="node18" class="node"><title>N17</title>
<polygon fill="none" stroke="black" points="983,-668.5 845,-668.5 845,-603.5 983,-603.5 983,-668.5"/>
<text text-anchor="middle" x="914" y="-650.91" font-family="Times Roman,serif" font-size="15.10">unicode.Is</text>
<text text-anchor="end" x="975.5" y="-631.91" font-family="Times Roman,serif" font-size="15.10">3922 (2.0%)</text>
<text text-anchor="end" x="975.5" y="-612.91" font-family="Times Roman,serif" font-size="15.10">of 14960 (7.7%)</text>
</g>
<!-- N10&#45;&gt;N17 -->
<g id="edge126" class="edge"><title>N10&#45;&gt;N17</title>
<path fill="none" stroke="black" d="M914,-741.296C914,-722.699 914,-699.184 914,-679.096"/>
<polygon fill="black" stroke="black" points="917.5,-678.948 914,-668.948 910.5,-678.948 917.5,-678.948"/>
<text text-anchor="middle" x="937" y="-707.4" font-family="Times Roman,serif" font-size="14.00">14960</text>
</g>
<!-- N10&#45;&gt;N18 -->
<g id="edge18" class="edge"><title>N10&#45;&gt;N18</title>
<path fill="none" stroke="black" d="M972.458,-741.471C1006.39,-722.592 1049.5,-698.6 1086.03,-678.271"/>
<polygon fill="black" stroke="black" points="1088.14,-681.108 1095.17,-673.187 1084.73,-674.991 1088.14,-681.108"/>
<text text-anchor="middle" x="1056.5" y="-707.4" font-family="Times Roman,serif" font-size="14.00">5225</text>
</g>
<!-- N11 -->
<g id="node12" class="node"><title>N11</title>
<polygon fill="none" stroke="black" points="434,-529.5 232,-529.5 232,-446.5 434,-446.5 434,-529.5"/>
<text text-anchor="middle" x="333" y="-506.69" font-family="Times Roman,serif" font-size="20.90">runtime.mallocgc</text>
<text text-anchor="end" x="426" y="-481.69" font-family="Times Roman,serif" font-size="20.90">12957 (6.7%)</text>
<text text-anchor="end" x="426" y="-456.69" font-family="Times Roman,serif" font-size="20.90">of 22876 (11.8%)</text>
</g>
<!-- N29 -->
<g id="node30" class="node"><title>N29</title>
<polygon fill="none" stroke="black" points="388,-363.5 278,-363.5 278,-322.5 388,-322.5 388,-363.5"/>
<text text-anchor="middle" x="333" y="-351.76" font-family="Times Roman,serif" font-size="8.60">runtime.MCache_Refill</text>
<text text-anchor="end" x="380" y="-340.76" font-family="Times Roman,serif" font-size="8.60">26 (0.0%)</text>
<text text-anchor="end" x="380" y="-329.76" font-family="Times Roman,serif" font-size="8.60">of 4678 (2.4%)</text>
</g>
<!-- N11&#45;&gt;N29 -->
<g id="edge84" class="edge"><title>N11&#45;&gt;N29</title>
<path fill="none" stroke="black" d="M333,-446.449C333,-423.253 333,-394.855 333,-373.684"/>
<polygon fill="black" stroke="black" points="336.5,-373.633 333,-363.633 329.5,-373.633 336.5,-373.633"/>
<text text-anchor="middle" x="351.5" y="-411.4" font-family="Times Roman,serif" font-size="14.00">4678</text>
</g>
<!-- N31 -->
<g id="node32" class="node"><title>N31</title>
<polygon fill="none" stroke="black" points="260,-366 62,-366 62,-320 260,-320 260,-366"/>
<text text-anchor="middle" x="161" y="-347.96" font-family="Times Roman,serif" font-size="15.60">runtime.markallocated</text>
<text text-anchor="end" x="252" y="-328.96" font-family="Times Roman,serif" font-size="15.60">4446 (2.3%)</text>
</g>
<!-- N11&#45;&gt;N31 -->
<g id="edge104" class="edge"><title>N11&#45;&gt;N31</title>
<path fill="none" stroke="black" d="M283.712,-446.449C255.764,-422.889 221.449,-393.96 196.22,-372.691"/>
<polygon fill="black" stroke="black" points="198.268,-369.84 188.367,-366.071 193.757,-375.192 198.268,-369.84"/>
<text text-anchor="middle" x="271.5" y="-411.4" font-family="Times Roman,serif" font-size="14.00">4444</text>
</g>
<!-- N13 -->
<g id="node14" class="node"><title>N13</title>
<polygon fill="none" stroke="black" points="988,-941 798,-941 798,-891 988,-891 988,-941"/>
<text text-anchor="middle" x="893" y="-927.01" font-family="Times Roman,serif" font-size="11.10">encoding/xml.(*Decoder).name</text>
<text text-anchor="end" x="980" y="-913.01" font-family="Times Roman,serif" font-size="11.10">731 (0.4%)</text>
<text text-anchor="end" x="980" y="-899.01" font-family="Times Roman,serif" font-size="11.10">of 18649 (9.6%)</text>
</g>
<!-- N12&#45;&gt;N13 -->
<g id="edge38" class="edge"><title>N12&#45;&gt;N13</title>
<path fill="none" stroke="black" d="M1039.14,-1023.98C1009.7,-1002.23 966.896,-970.601 935.219,-947.195"/>
<polygon fill="black" stroke="black" points="937.133,-944.258 927.01,-941.13 932.973,-949.887 937.133,-944.258"/>
<text text-anchor="middle" x="1033" y="-991.4" font-family="Times Roman,serif" font-size="14.00">18649</text>
</g>
<!-- N42 -->
<g id="node43" class="node"><title>N42</title>
<polygon fill="none" stroke="black" points="780,-939.5 694,-939.5 694,-892.5 780,-892.5 780,-939.5"/>
<text text-anchor="middle" x="737" y="-926.5" font-family="Times Roman,serif" font-size="10.00">strings.Index</text>
<text text-anchor="end" x="772.5" y="-913.5" font-family="Times Roman,serif" font-size="10.00">304 (0.2%)</text>
<text text-anchor="end" x="772.5" y="-900.5" font-family="Times Roman,serif" font-size="10.00">of 1217 (0.6%)</text>
</g>
<!-- N12&#45;&gt;N42 -->
<g id="edge118" class="edge"><title>N12&#45;&gt;N42</title>
<path fill="none" stroke="black" d="M976.151,-1023.95C900.544,-1003.97 805.601,-977.763 789,-968 779.673,-962.515 770.823,-954.963 763.155,-947.313"/>
<polygon fill="black" stroke="black" points="765.339,-944.531 755.908,-939.703 760.27,-949.359 765.339,-944.531"/>
<text text-anchor="middle" x="920.5" y="-991.4" font-family="Times Roman,serif" font-size="14.00">1217</text>
</g>
<!-- N13&#45;&gt;N9 -->
<g id="edge58" class="edge"><title>N13&#45;&gt;N9</title>
<path fill="none" stroke="black" d="M885.025,-890.941C880.457,-871.179 878.345,-844.317 894,-828 920.268,-800.622 1197.38,-814.945 1235,-810 1236.12,-809.853 1237.25,-809.702 1238.38,-809.548"/>
<polygon fill="black" stroke="black" points="1239.21,-812.963 1248.61,-808.076 1238.21,-806.035 1239.21,-812.963"/>
<text text-anchor="middle" x="912.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">8007</text>
</g>
<!-- N13&#45;&gt;N10 -->
<g id="edge36" class="edge"><title>N13&#45;&gt;N10</title>
<path fill="none" stroke="black" d="M839.212,-890.987C811.366,-876.816 781.616,-859.316 774,-846 770.028,-839.056 769.474,-834.597 774,-828 774.858,-826.75 793.622,-819.261 817.15,-810.24"/>
<polygon fill="black" stroke="black" points="818.647,-813.415 826.741,-806.577 816.15,-806.875 818.647,-813.415"/>
<text text-anchor="middle" x="792.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">6491</text>
</g>
<!-- N13&#45;&gt;N21 -->
<g id="edge132" class="edge"><title>N13&#45;&gt;N21</title>
<path fill="none" stroke="black" d="M846.91,-890.874C829.117,-881.73 808.404,-871.747 789,-864 763.539,-853.834 755.01,-857.229 730,-846 704.504,-834.553 677.786,-818.622 656.234,-804.654"/>
<polygon fill="black" stroke="black" points="657.917,-801.572 647.636,-799.009 654.075,-807.423 657.917,-801.572"/>
<text text-anchor="middle" x="748.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">1712</text>
</g>
<!-- N13&#45;&gt;N24 -->
<g id="edge106" class="edge"><title>N13&#45;&gt;N24</title>
<path fill="none" stroke="black" d="M850.809,-890.936C832.405,-881.064 810.22,-870.543 789,-864 731.998,-846.424 714.421,-858.045 656,-846 597.702,-833.98 583.013,-830.141 527,-810 521.108,-807.881 515.043,-805.527 509.008,-803.065"/>
<polygon fill="black" stroke="black" points="510.156,-799.751 499.58,-799.126 507.458,-806.21 510.156,-799.751"/>
<text text-anchor="middle" x="674.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">1325</text>
</g>
<!-- N14&#45;&gt;N8 -->
<g id="edge60" class="edge"><title>N14&#45;&gt;N8</title>
<path fill="none" stroke="black" d="M1919.5,-603.338C1961.26,-584.264 2014.83,-559.796 2061.87,-538.307"/>
<polygon fill="black" stroke="black" points="2063.54,-541.391 2071.18,-534.052 2060.63,-535.023 2063.54,-541.391"/>
<text text-anchor="middle" x="2052" y="-557.4" font-family="Times Roman,serif" font-size="14.00">13195</text>
</g>
<!-- N20 -->
<g id="node21" class="node"><title>N20</title>
<polygon fill="none" stroke="black" points="991,-517 837,-517 837,-459 991,-459 991,-517"/>
<text text-anchor="middle" x="914" y="-495.09" font-family="Times Roman,serif" font-size="19.90">unicode.is16</text>
<text text-anchor="end" x="983.5" y="-470.09" font-family="Times Roman,serif" font-size="19.90">11038 (5.7%)</text>
</g>
<!-- N17&#45;&gt;N20 -->
<g id="edge24" class="edge"><title>N17&#45;&gt;N20</title>
<path fill="none" stroke="black" d="M914,-603.154C914,-580.751 914,-550.969 914,-527.305"/>
<polygon fill="black" stroke="black" points="917.5,-527.246 914,-517.246 910.5,-527.246 917.5,-527.246"/>
<text text-anchor="middle" x="937" y="-557.4" font-family="Times Roman,serif" font-size="14.00">11038</text>
</g>
<!-- N25 -->
<g id="node26" class="node"><title>N25</title>
<polygon fill="none" stroke="black" points="1315,-514 1009,-514 1009,-462 1315,-462 1315,-514"/>
<text text-anchor="middle" x="1162" y="-494.34" font-family="Times Roman,serif" font-size="17.40">unicode/utf8.decodeRuneInternal</text>
<text text-anchor="end" x="1307" y="-472.34" font-family="Times Roman,serif" font-size="17.40">6809 (3.5%)</text>
</g>
<!-- N18&#45;&gt;N25 -->
<g id="edge76" class="edge"><title>N18&#45;&gt;N25</title>
<path fill="none" stroke="black" d="M1162,-598.653C1162,-575.885 1162,-546.922 1162,-524.339"/>
<polygon fill="black" stroke="black" points="1165.5,-524.14 1162,-514.14 1158.5,-524.14 1165.5,-524.14"/>
<text text-anchor="middle" x="1180.5" y="-557.4" font-family="Times Roman,serif" font-size="14.00">6809</text>
</g>
<!-- N19 -->
<g id="node20" class="node"><title>N19</title>
<polygon fill="none" stroke="black" points="672,-665.5 552,-665.5 552,-606.5 672,-606.5 672,-665.5"/>
<text text-anchor="middle" x="612" y="-649.8" font-family="Times Roman,serif" font-size="13.00">gostringsize</text>
<text text-anchor="end" x="664" y="-632.8" font-family="Times Roman,serif" font-size="13.00">1901 (1.0%)</text>
<text text-anchor="end" x="664" y="-615.8" font-family="Times Roman,serif" font-size="13.00">of 12706 (6.6%)</text>
</g>
<!-- N19&#45;&gt;N11 -->
<g id="edge64" class="edge"><title>N19&#45;&gt;N11</title>
<path fill="none" stroke="black" d="M571.857,-606.44C562.568,-600.062 552.591,-593.569 543,-588 509.804,-568.723 472.305,-549.973 438.275,-534.018"/>
<polygon fill="black" stroke="black" points="439.319,-530.643 428.776,-529.593 436.363,-536.988 439.319,-530.643"/>
<text text-anchor="middle" x="533" y="-557.4" font-family="Times Roman,serif" font-size="14.00">10805</text>
</g>
<!-- N21&#45;&gt;N19 -->
<g id="edge120" class="edge"><title>N21&#45;&gt;N19</title>
<path fill="none" stroke="black" d="M612,-748.689C612,-728.354 612,-699.421 612,-675.963"/>
<polygon fill="black" stroke="black" points="615.5,-675.955 612,-665.955 608.5,-675.955 615.5,-675.955"/>
<text text-anchor="middle" x="630.5" y="-707.4" font-family="Times Roman,serif" font-size="14.00">7227</text>
</g>
<!-- N35 -->
<g id="node36" class="node"><title>N35</title>
<polygon fill="none" stroke="black" points="534,-658 388,-658 388,-614 534,-614 534,-658"/>
<text text-anchor="middle" x="461" y="-641.04" font-family="Times Roman,serif" font-size="14.40">runtime.memmove</text>
<text text-anchor="end" x="526.5" y="-623.04" font-family="Times Roman,serif" font-size="14.40">3138 (1.6%)</text>
</g>
<!-- N21&#45;&gt;N35 -->
<g id="edge42" class="edge"><title>N21&#45;&gt;N35</title>
<path fill="none" stroke="black" d="M551.769,-748.962C530.177,-739.112 509.149,-728.217 501,-720 486.643,-705.523 476.72,-684.9 470.348,-667.712"/>
<polygon fill="black" stroke="black" points="473.584,-666.362 467,-658.061 466.971,-668.656 473.584,-666.362"/>
<text text-anchor="middle" x="519.5" y="-707.4" font-family="Times Roman,serif" font-size="14.00">1080</text>
</g>
<!-- N22 -->
<g id="node23" class="node"><title>N22</title>
<polygon fill="none" stroke="black" points="1373,-1668 1295,-1668 1295,-1630 1373,-1630 1373,-1668"/>
<text text-anchor="middle" x="1334" y="-1656.8" font-family="Times Roman,serif" font-size="8.00">System</text>
<text text-anchor="end" x="1365.5" y="-1646.8" font-family="Times Roman,serif" font-size="8.00">0 (0.0%)</text>
<text text-anchor="end" x="1365.5" y="-1636.8" font-family="Times Roman,serif" font-size="8.00">of 8916 (4.6%)</text>
</g>
<!-- N28 -->
<g id="node29" class="node"><title>N28</title>
<polygon fill="none" stroke="black" points="1393,-1516 1275,-1516 1275,-1466 1393,-1466 1393,-1516"/>
<text text-anchor="middle" x="1334" y="-1497.06" font-family="Times Roman,serif" font-size="16.60">sweepspan</text>
<text text-anchor="end" x="1385.5" y="-1476.06" font-family="Times Roman,serif" font-size="16.60">5770 (3.0%)</text>
</g>
<!-- N22&#45;&gt;N28 -->
<g id="edge10" class="edge"><title>N22&#45;&gt;N28</title>
<path fill="none" stroke="black" d="M1334,-1629.94C1334,-1604.35 1334,-1558.41 1334,-1526.39"/>
<polygon fill="black" stroke="black" points="1337.5,-1526.12 1334,-1516.12 1330.5,-1526.12 1337.5,-1526.12"/>
<text text-anchor="middle" x="1352.5" y="-1541.4" font-family="Times Roman,serif" font-size="14.00">5770</text>
</g>
<!-- N47 -->
<g id="node48" class="node"><title>N47</title>
<polygon fill="none" stroke="black" points="1515,-1517.5 1411,-1517.5 1411,-1464.5 1515,-1464.5 1515,-1517.5"/>
<text text-anchor="middle" x="1463" y="-1502.88" font-family="Times Roman,serif" font-size="11.80">syscall.Syscall</text>
<text text-anchor="end" x="1507.5" y="-1487.88" font-family="Times Roman,serif" font-size="11.80">1137 (0.6%)</text>
<text text-anchor="end" x="1507.5" y="-1472.88" font-family="Times Roman,serif" font-size="11.80">of 1173 (0.6%)</text>
</g>
<!-- N22&#45;&gt;N47 -->
<g id="edge30" class="edge"><title>N22&#45;&gt;N47</title>
<path fill="none" stroke="black" d="M1349.56,-1629.94C1370.63,-1604.14 1408.59,-1557.64 1434.76,-1525.59"/>
<polygon fill="black" stroke="black" points="1437.52,-1527.74 1441.14,-1517.78 1432.1,-1523.31 1437.52,-1527.74"/>
<text text-anchor="middle" x="1442.5" y="-1541.4" font-family="Times Roman,serif" font-size="14.00">1137</text>
</g>
<!-- N27 -->
<g id="node28" class="node"><title>N27</title>
<polygon fill="none" stroke="black" points="347,-939.5 255,-939.5 255,-892.5 347,-892.5 347,-939.5"/>
<text text-anchor="middle" x="301" y="-926.14" font-family="Times Roman,serif" font-size="10.40">copyin</text>
<text text-anchor="end" x="339.5" y="-913.14" font-family="Times Roman,serif" font-size="10.40">447 (0.2%)</text>
<text text-anchor="end" x="339.5" y="-900.14" font-family="Times Roman,serif" font-size="10.40">of 5876 (3.0%)</text>
</g>
<!-- N23&#45;&gt;N27 -->
<g id="edge12" class="edge"><title>N23&#45;&gt;N27</title>
<path fill="none" stroke="black" d="M843.752,-1024.88C840.812,-1023.85 837.882,-1022.88 835,-1022 664.597,-969.738 455.482,-936.954 357.152,-923.31"/>
<polygon fill="black" stroke="black" points="357.519,-919.827 347.135,-921.933 356.566,-926.762 357.519,-919.827"/>
<text text-anchor="middle" x="782.5" y="-991.4" font-family="Times Roman,serif" font-size="14.00">5876</text>
</g>
<!-- N24&#45;&gt;N11 -->
<g id="edge26" class="edge"><title>N24&#45;&gt;N11</title>
<path fill="none" stroke="black" d="M397.405,-748.989C374.449,-733.867 350.279,-712.054 342,-684 328.03,-636.664 326.99,-580.127 328.719,-539.966"/>
<polygon fill="black" stroke="black" points="332.221,-540.031 329.227,-529.868 325.229,-539.679 332.221,-540.031"/>
<text text-anchor="middle" x="360.5" y="-632.4" font-family="Times Roman,serif" font-size="14.00">5552</text>
</g>
<!-- N24&#45;&gt;N35 -->
<g id="edge28" class="edge"><title>N24&#45;&gt;N35</title>
<path fill="none" stroke="black" d="M446.717,-748.953C447.283,-735.085 448.277,-717.554 450,-702 451.218,-691.003 453.053,-679.052 454.876,-668.38"/>
<polygon fill="black" stroke="black" points="458.379,-668.673 456.673,-658.217 451.485,-667.455 458.379,-668.673"/>
<text text-anchor="middle" x="464" y="-707.4" font-family="Times Roman,serif" font-size="14.00">694</text>
</g>
<!-- N26&#45;&gt;N19 -->
<g id="edge74" class="edge"><title>N26&#45;&gt;N19</title>
<path fill="none" stroke="black" d="M729.588,-748.689C707.44,-727.463 675.514,-696.868 650.516,-672.912"/>
<polygon fill="black" stroke="black" points="652.641,-670.1 642.999,-665.708 647.798,-675.154 652.641,-670.1"/>
<text text-anchor="middle" x="715.5" y="-707.4" font-family="Times Roman,serif" font-size="14.00">5479</text>
</g>
<!-- N33 -->
<g id="node34" class="node"><title>N33</title>
<polygon fill="none" stroke="black" points="228,-796 142,-796 142,-752 228,-752 228,-796"/>
<text text-anchor="middle" x="185" y="-783.54" font-family="Times Roman,serif" font-size="9.40">runtime.mal</text>
<text text-anchor="end" x="220.5" y="-771.54" font-family="Times Roman,serif" font-size="9.40">145 (0.1%)</text>
<text text-anchor="end" x="220.5" y="-759.54" font-family="Times Roman,serif" font-size="9.40">of 4170 (2.2%)</text>
</g>
<!-- N27&#45;&gt;N33 -->
<g id="edge48" class="edge"><title>N27&#45;&gt;N33</title>
<path fill="none" stroke="black" d="M281.584,-892.232C261.828,-868.048 231.141,-830.483 209.674,-804.204"/>
<polygon fill="black" stroke="black" points="212.367,-801.968 203.33,-796.438 206.945,-806.397 212.367,-801.968"/>
<text text-anchor="middle" x="261.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">4170</text>
</g>
<!-- N45 -->
<g id="node46" class="node"><title>N45</title>
<polygon fill="none" stroke="black" points="356,-799 246,-799 246,-749 356,-749 356,-799"/>
<text text-anchor="middle" x="301" y="-785.37" font-family="Times Roman,serif" font-size="10.70">runtime.memcopy</text>
<text text-anchor="end" x="348" y="-771.37" font-family="Times Roman,serif" font-size="10.70">576 (0.3%)</text>
<text text-anchor="end" x="348" y="-757.37" font-family="Times Roman,serif" font-size="10.70">of 1180 (0.6%)</text>
</g>
<!-- N27&#45;&gt;N45 -->
<g id="edge70" class="edge"><title>N27&#45;&gt;N45</title>
<path fill="none" stroke="black" d="M301,-892.232C301,-869.611 301,-835.281 301,-809.432"/>
<polygon fill="black" stroke="black" points="304.5,-809.283 301,-799.283 297.5,-809.283 304.5,-809.283"/>
<text text-anchor="middle" x="315" y="-833.4" font-family="Times Roman,serif" font-size="14.00">775</text>
</g>
<!-- N30 -->
<g id="node31" class="node"><title>N30</title>
<polygon fill="none" stroke="black" points="402,-244 264,-244 264,-200 402,-200 402,-244"/>
<text text-anchor="middle" x="333" y="-231.81" font-family="Times Roman,serif" font-size="9.10">runtime.MCentral_AllocList</text>
<text text-anchor="end" x="394.5" y="-219.81" font-family="Times Roman,serif" font-size="9.10">102 (0.1%)</text>
<text text-anchor="end" x="394.5" y="-207.81" font-family="Times Roman,serif" font-size="9.10">of 4652 (2.4%)</text>
</g>
<!-- N29&#45;&gt;N30 -->
<g id="edge110" class="edge"><title>N29&#45;&gt;N30</title>
<path fill="none" stroke="black" d="M333,-322.474C333,-303.816 333,-275.977 333,-254.332"/>
<polygon fill="black" stroke="black" points="336.5,-254.27 333,-244.27 329.5,-254.27 336.5,-254.27"/>
<text text-anchor="middle" x="351.5" y="-267.4" font-family="Times Roman,serif" font-size="14.00">4652</text>
</g>
<!-- N32 -->
<g id="node33" class="node"><title>N32</title>
<polygon fill="none" stroke="black" points="384,-146 282,-146 282,-96 384,-96 384,-146"/>
<text text-anchor="middle" x="333" y="-132.19" font-family="Times Roman,serif" font-size="10.90">MCentral_Grow</text>
<text text-anchor="end" x="376.5" y="-118.19" font-family="Times Roman,serif" font-size="10.90">662 (0.3%)</text>
<text text-anchor="end" x="376.5" y="-104.19" font-family="Times Roman,serif" font-size="10.90">of 4360 (2.2%)</text>
</g>
<!-- N30&#45;&gt;N32 -->
<g id="edge92" class="edge"><title>N30&#45;&gt;N32</title>
<path fill="none" stroke="black" d="M333,-199.585C333,-186.865 333,-170.659 333,-156.272"/>
<polygon fill="black" stroke="black" points="336.5,-156.193 333,-146.194 329.5,-156.194 336.5,-156.193"/>
<text text-anchor="middle" x="351.5" y="-169.4" font-family="Times Roman,serif" font-size="14.00">4360</text>
</g>
<!-- N38 -->
<g id="node39" class="node"><title>N38</title>
<polygon fill="none" stroke="black" points="401,-42 265,-42 265,-2.13163e-14 401,-7.10543e-15 401,-42"/>
<text text-anchor="middle" x="333" y="-25.85" font-family="Times Roman,serif" font-size="13.50">runtime.markspan</text>
<text text-anchor="end" x="393.5" y="-8.85" font-family="Times Roman,serif" font-size="13.50">2324 (1.2%)</text>
</g>
<!-- N32&#45;&gt;N38 -->
<g id="edge130" class="edge"><title>N32&#45;&gt;N38</title>
<path fill="none" stroke="black" d="M333,-95.7658C333,-82.5792 333,-66.318 333,-52.3321"/>
<polygon fill="black" stroke="black" points="336.5,-52.1692 333,-42.1692 329.5,-52.1693 336.5,-52.1692"/>
<text text-anchor="middle" x="351.5" y="-65.4" font-family="Times Roman,serif" font-size="14.00">2324</text>
</g>
<!-- N43 -->
<g id="node44" class="node"><title>N43</title>
<polygon fill="none" stroke="black" points="533,-41.5 419,-41.5 419,-0.5 533,-0.5 533,-41.5"/>
<text text-anchor="middle" x="476" y="-29.67" font-family="Times Roman,serif" font-size="8.70">runtime.MHeap_Alloc</text>
<text text-anchor="end" x="525" y="-18.67" font-family="Times Roman,serif" font-size="8.70">38 (0.0%)</text>
<text text-anchor="end" x="525" y="-7.67" font-family="Times Roman,serif" font-size="8.70">of 1213 (0.6%)</text>
</g>
<!-- N32&#45;&gt;N43 -->
<g id="edge82" class="edge"><title>N32&#45;&gt;N43</title>
<path fill="none" stroke="black" d="M369.085,-95.7658C390.268,-80.9528 416.998,-62.26 438.432,-47.2711"/>
<polygon fill="black" stroke="black" points="440.473,-50.1147 446.663,-41.5156 436.462,-44.3782 440.473,-50.1147"/>
<text text-anchor="middle" x="436.5" y="-65.4" font-family="Times Roman,serif" font-size="14.00">1212</text>
</g>
<!-- N33&#45;&gt;N11 -->
<g id="edge98" class="edge"><title>N33&#45;&gt;N11</title>
<path fill="none" stroke="black" d="M196.613,-751.558C220.222,-705.935 274.331,-601.374 306.852,-538.53"/>
<polygon fill="black" stroke="black" points="309.999,-540.062 311.487,-529.573 303.783,-536.845 309.999,-540.062"/>
<text text-anchor="middle" x="299.5" y="-632.4" font-family="Times Roman,serif" font-size="14.00">4025</text>
</g>
<!-- N46 -->
<g id="node47" class="node"><title>N46</title>
<polygon fill="none" stroke="black" points="2144,-655 2006,-655 2006,-617 2144,-617 2144,-655"/>
<text text-anchor="middle" x="2075" y="-640.29" font-family="Times Roman,serif" font-size="11.90">runtime.memeqbody</text>
<text text-anchor="end" x="2136" y="-625.29" font-family="Times Roman,serif" font-size="11.90">1173 (0.6%)</text>
</g>
<!-- N34&#45;&gt;N46 -->
<g id="edge66" class="edge"><title>N34&#45;&gt;N46</title>
<path fill="none" stroke="black" d="M2051.44,-744.396C2056.51,-721.045 2063.56,-688.641 2068.62,-665.355"/>
<polygon fill="black" stroke="black" points="2072.09,-665.878 2070.79,-655.363 2065.25,-664.391 2072.09,-665.878"/>
<text text-anchor="middle" x="2074" y="-707.4" font-family="Times Roman,serif" font-size="14.00">993</text>
</g>
<!-- N36&#45;&gt;N15 -->
<g id="edge78" class="edge"><title>N36&#45;&gt;N15</title>
<path fill="none" stroke="black" d="M1152.45,-747.486C1209.78,-722.944 1286.64,-689.446 1292,-684 1324.55,-650.94 1301.3,-621.872 1333,-588 1351.32,-568.422 1374.33,-552.079 1398.1,-538.665"/>
<polygon fill="black" stroke="black" points="1399.8,-541.728 1406.89,-533.855 1396.43,-535.588 1399.8,-541.728"/>
<text text-anchor="middle" x="1347" y="-632.4" font-family="Times Roman,serif" font-size="14.00">855</text>
</g>
<!-- N36&#45;&gt;N35 -->
<g id="edge94" class="edge"><title>N36&#45;&gt;N35</title>
<path fill="none" stroke="black" d="M1040.51,-747.405C1031.57,-743.61 1022.17,-740.24 1013,-738 919.442,-715.16 671.168,-751.034 580,-720 546.379,-708.555 513.833,-684.387 491.3,-664.9"/>
<polygon fill="black" stroke="black" points="493.571,-662.236 483.763,-658.231 488.933,-667.478 493.571,-662.236"/>
<text text-anchor="middle" x="594" y="-707.4" font-family="Times Roman,serif" font-size="14.00">759</text>
</g>
<!-- N39 -->
<g id="node40" class="node"><title>N39</title>
<polygon fill="none" stroke="black" points="237,-938 151,-938 151,-894 237,-894 237,-938"/>
<text text-anchor="middle" x="194" y="-925.99" font-family="Times Roman,serif" font-size="8.90">makeslice1</text>
<text text-anchor="end" x="229" y="-913.99" font-family="Times Roman,serif" font-size="8.90">59 (0.0%)</text>
<text text-anchor="end" x="229" y="-901.99" font-family="Times Roman,serif" font-size="8.90">of 1996 (1.0%)</text>
</g>
<!-- N37&#45;&gt;N39 -->
<g id="edge52" class="edge"><title>N37&#45;&gt;N39</title>
<path fill="none" stroke="black" d="M715.668,-1045.09C597.939,-1036.03 326.792,-1011.02 246,-968 235.56,-962.441 225.867,-954.096 217.746,-945.708"/>
<polygon fill="black" stroke="black" points="220.089,-943.085 210.755,-938.073 214.927,-947.812 220.089,-943.085"/>
<text text-anchor="middle" x="384.5" y="-991.4" font-family="Times Roman,serif" font-size="14.00">1996</text>
</g>
<!-- N40 -->
<g id="node41" class="node"><title>N40</title>
<polygon fill="none" stroke="black" points="124,-794.5 28,-794.5 28,-753.5 124,-753.5 124,-794.5"/>
<text text-anchor="middle" x="76" y="-782.76" font-family="Times Roman,serif" font-size="8.60">runtime.cnewarray</text>
<text text-anchor="end" x="116.5" y="-771.76" font-family="Times Roman,serif" font-size="8.60">24 (0.0%)</text>
<text text-anchor="end" x="116.5" y="-760.76" font-family="Times Roman,serif" font-size="8.60">of 1937 (1.0%)</text>
</g>
<!-- N39&#45;&gt;N40 -->
<g id="edge112" class="edge"><title>N39&#45;&gt;N40</title>
<path fill="none" stroke="black" d="M175.562,-893.812C155.12,-869.212 122.086,-829.459 99.7283,-802.554"/>
<polygon fill="black" stroke="black" points="102.241,-800.102 93.1582,-794.648 96.8575,-804.576 102.241,-800.102"/>
<text text-anchor="middle" x="153.5" y="-833.4" font-family="Times Roman,serif" font-size="14.00">1937</text>
</g>
<!-- N41 -->
<g id="node42" class="node"><title>N41</title>
<polygon fill="none" stroke="black" points="122,-659.5 30,-659.5 30,-612.5 122,-612.5 122,-659.5"/>
<text text-anchor="middle" x="76" y="-646.32" font-family="Times Roman,serif" font-size="10.20">cnew</text>
<text text-anchor="end" x="114.5" y="-633.32" font-family="Times Roman,serif" font-size="10.20">375 (0.2%)</text>
<text text-anchor="end" x="114.5" y="-620.32" font-family="Times Roman,serif" font-size="10.20">of 1913 (1.0%)</text>
</g>
<!-- N40&#45;&gt;N41 -->
<g id="edge68" class="edge"><title>N40&#45;&gt;N41</title>
<path fill="none" stroke="black" d="M76,-753.34C76,-731.268 76,-695.932 76,-669.799"/>
<polygon fill="black" stroke="black" points="79.5001,-669.58 76,-659.58 72.5001,-669.58 79.5001,-669.58"/>
<text text-anchor="middle" x="94.5" y="-707.4" font-family="Times Roman,serif" font-size="14.00">1913</text>
</g>
<!-- N41&#45;&gt;N11 -->
<g id="edge46" class="edge"><title>N41&#45;&gt;N11</title>
<path fill="none" stroke="black" d="M97.9972,-612.485C116.183,-594.105 143.412,-568.919 171,-552 187.025,-542.172 204.82,-533.343 222.58,-525.608"/>
<polygon fill="black" stroke="black" points="224.022,-528.798 231.854,-521.663 221.282,-522.357 224.022,-528.798"/>
<text text-anchor="middle" x="189.5" y="-557.4" font-family="Times Roman,serif" font-size="14.00">1538</text>
</g>
<!-- N45&#45;&gt;N35 -->
<g id="edge20" class="edge"><title>N45&#45;&gt;N35</title>
<path fill="none" stroke="black" d="M330.346,-748.689C357.807,-725.004 398.793,-689.653 427.518,-664.878"/>
<polygon fill="black" stroke="black" points="429.987,-667.371 435.274,-658.189 425.415,-662.07 429.987,-667.371"/>
<text text-anchor="middle" x="395" y="-707.4" font-family="Times Roman,serif" font-size="14.00">604</text>
</g>
<!-- N48&#45;&gt;N34 -->
<g id="edge62" class="edge"><title>N48&#45;&gt;N34</title>
<path fill="none" stroke="black" d="M1548.24,-1156.7C1680.13,-1150.01 1902.73,-1135.42 1932,-1112 2024.44,-1038.03 2041.82,-885.816 2044.71,-813.64"/>
<polygon fill="black" stroke="black" points="2048.21,-813.7 2045.03,-803.591 2041.21,-813.472 2048.21,-813.7"/>
<text text-anchor="middle" x="2027" y="-991.4" font-family="Times Roman,serif" font-size="14.00">417</text>
</g>
<!-- N49&#45;&gt;N11 -->
<g id="edge54" class="edge"><title>N49&#45;&gt;N11</title>
<path fill="none" stroke="black" d="M879.877,-1160.4C702.804,-1157.24 0,-1139 0,-1049 0,-1049 0,-1049 0,-636 0,-612.714 3.71469,-603.603 21,-588 76.2226,-538.153 156.453,-513.138 221.726,-500.593"/>
<polygon fill="black" stroke="black" points="222.458,-504.017 231.655,-498.757 221.185,-497.133 222.458,-504.017"/>
<text text-anchor="middle" x="14" y="-833.4" font-family="Times Roman,serif" font-size="14.00">949</text>
</g>
</g>
</g></svg>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// example of parallel XML stream processing, using wikidata XML dump
package main
import (
"encoding/xml"
"flag"
"fmt"
"os"
"runtime/pprof"
)
type Redirect struct {
Title string `xml:"title,attr" json:"title"`
}
// A page as it occurs on Wikipedia
type Page struct {
Title string `xml:"title" json:"title"`
CanonicalTitle string `xml:"ctitle" json:"ctitle"`
Redir Redirect `xml:"redirect" json:"redirect"`
Text string `xml:"revision>text" json:"text"`
}
func main() {
cpuprofile := flag.String("cpuprofile", "", "write cpu profile to file")
flag.Parse()
if *cpuprofile != "" {
f, err := os.Create(*cpuprofile)
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
}
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage: %s WIKDATA-XML-FILE\n", os.Args[0])
fmt.Fprintf(os.Stderr, "Find dumps under http://dumps.wikimedia.org/wikidatawiki/\n")
flag.PrintDefaults()
}
if flag.NArg() < 1 {
flag.Usage()
os.Exit(1)
}
filename := flag.Args()[0]
handle, err := os.Open(filename)
if err != nil {
fmt.Println(err)
return
}
defer handle.Close()
decoder := xml.NewDecoder(handle)
var inElement string
var p Page
for {
// Read tokens from the XML document in a stream.
t, _ := decoder.Token()
if t == nil {
break
}
// Inspect the type of the token just read.
switch se := t.(type) {
case xml.StartElement:
// If we just read a StartElement token
inElement = se.Name.Local
// ...and its name is "page"
if inElement == "page" {
// decode a whole chunk of following XML into the
// variable p which is a Page (se above)
decoder.DecodeElement(&p, &se)
}
default:
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment