docs/figures/example-1-update.svg
author Mathias De Maré <mathias.demare@gmail.com>
Mon, 02 Mar 2015 20:12:00 +0100
branchstable
changeset 1203 936aa82884ab
parent 162 1a6ae8d8f104
permissions -rw-r--r--
evolve: cache marker encoding to avoid performance degradation The main overhead in bug 4518 is caused by calculating relevant markers and encoding markers into the correct format. Calculating relevant markers takes (worst case) ~ 0.12 seconds. Encoding markers takes (worst case) ~ 0.06 seconds. Caching encoded markers takes care of the second part and speeds up cloning in bug 4518 by about 35%.

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="47 621 426 249" width="426pt" height="249pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-03-21 08:32Z</dc:date><!-- Produced by OmniGraffle Professional 5.3.6 --></metadata><defs><filter id="Shadow" filterUnits="userSpaceOnUse"><feGaussianBlur in="SourceAlpha" result="blur" stdDeviation="3.488"/><feOffset in="blur" result="offset" dx="0" dy="4"/><feFlood flood-color="black" flood-opacity=".75" result="flood"/><feComposite in="flood" in2="offset" operator="in"/></filter><font-face font-family="Helvetica" font-size="26" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.31641" slope="0" x-height="522.94922" cap-height="717.2852" ascent="770.0196" descent="-229.98048" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledDiamond_Marker" viewBox="-1 -3 6 6" markerWidth="6" markerHeight="6" color="red"><g><path d="M 3.7333333 0 L 1.8666667 -1.4 L 0 0 L 1.8666667 1.4 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Canvas 1</title><g><title>Layer 1</title><g><use xl:href="#id464_Graphic" filter="url(#Shadow)"/><use xl:href="#id463_Graphic" filter="url(#Shadow)"/><use xl:href="#id465_Graphic" filter="url(#Shadow)"/><use xl:href="#id466_Graphic" filter="url(#Shadow)"/><use xl:href="#id472_Graphic" filter="url(#Shadow)"/><use xl:href="#id471_Graphic" filter="url(#Shadow)"/><use xl:href="#id475_Graphic" filter="url(#Shadow)"/></g><g id="id464_Graphic"><rect x="67" y="637.9972" width="141" height="207.84595" fill="white" fill-opacity=".5"/><rect x="67" y="637.9972" width="141" height="207.84595" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g><g id="id463_Graphic"><circle cx="128.71246" cy="718.34644" r="28.346489" fill="red"/><circle cx="128.71246" cy="718.34644" r="28.346489" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(111.035286 702.84644)" fill="black"><tspan font-family="Helvetica" font-size="26" font-weight="500" x="9.006262" y="25" textLength="17.341797">A</tspan></text></g><line x1="128.93794" y1="770.9975" x2="128.83687" y2="747.19263" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><circle cx="129.000244" cy="785.6706" r="14.173275" fill="black"/><circle cx="129.000244" cy="785.6706" r="14.173275" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><circle cx="129.000244" cy="831.6706" r="14.173275" fill="black"/><circle cx="129.000244" cy="831.6706" r="14.173275" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="128.96199" y1="800.3438" x2="128.91855" y2="816.99756" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><g id="id465_Graphic"><rect x="277" y="637.99725" width="176" height="207.84595" fill="white" fill-opacity=".5"/><rect x="277" y="637.99725" width="176" height="207.84595" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g><g id="id466_Graphic"><circle cx="407.34644" cy="703.95215" r="28.346495" fill="red"/><circle cx="407.34644" cy="703.95215" r="28.346495" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(389.66928 688.45215)" fill="black"><tspan font-family="Helvetica" font-size="26" font-weight="500" x="6.1180782" y="25" textLength="23.118164">A’</tspan></text></g><line x1="378.9428" y1="772.1349" x2="396.34451" y2="730.6261" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><g id="id472_Graphic"><circle cx="373.26825" cy="785.67053" r="14.173267" fill="black"/><circle cx="373.26825" cy="785.67053" r="14.173267" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g><g id="id471_Graphic"><circle cx="373.26825" cy="831.67053" r="14.173267" fill="black"/><circle cx="373.26825" cy="831.67053" r="14.173267" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g><line x1="373.26837" y1="800.34375" x2="373.26852" y2="816.9973" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="365.1879" y1="773.41925" x2="335.23688" y2="728.00824" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><g id="id475_Graphic"><circle cx="319.30762" cy="703.95215" r="28.346495" fill="red" fill-opacity=".5"/><path d="M 339.35156 683.9082 C 350.4216 694.97815 350.4216 712.92615 339.35156 723.9961 C 328.28159 735.0661 310.33365 735.0661 299.26367 723.9961 C 288.19363 712.92615 288.19363 694.97815 299.26367 683.9082 C 310.33365 672.8382 328.28159 672.8382 339.35156 683.9082" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="8,5"/><text transform="translate(301.63046 688.45215)" fill="black"><tspan font-family="Helvetica" font-size="26" font-weight="500" x="9.006262" y="25" textLength="17.341797">A</tspan></text></g><line x1="378.49997" y1="703.95215" x2="362.1041" y2="703.95215" marker-end="url(#FilledDiamond_Marker)" stroke="red" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" stroke-dasharray="1,4"/></g></g></svg>