diff --git a/benchmarks/big-table/demo.css b/benchmarks/big-table/demo.css deleted file mode 100644 index a83742c..0000000 --- a/benchmarks/big-table/demo.css +++ /dev/null @@ -1,15 +0,0 @@ -form { - margin-bottom: 15px; -} - -td.hidden { - color: #ccc; -} - -table.filtered td.item { - background-color: #FFFFBF; -} - -table.filtered td.item.hidden { - background-color: transparent; -} diff --git a/benchmarks/big-table/index.html b/benchmarks/big-table/index.html deleted file mode 100644 index 1567546..0000000 --- a/benchmarks/big-table/index.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - -
-

Rendering Dynamic Big Table

-

Reference: insin/ui-lib-samples/large-datasets

- -

- {{ rows }} x {{ cols }}, {{ optimized ? 'with' : 'without' }} optimization. {{ msg }} -

- -

- - - - -

- -
- Filter Data: - - - - - — - Filtering {{ filter }} - over {{ dataPoints }} data points, - {{ visibleCount() }} found. - - -
- - - - - - -
{{ row.id }} - {{ item.value }} -
-
- - - - diff --git a/benchmarks/big-table/style.css b/benchmarks/big-table/style.css deleted file mode 100644 index d58a918..0000000 --- a/benchmarks/big-table/style.css +++ /dev/null @@ -1,553 +0,0 @@ -@font-face { - font-family: octicons-anchor; - src: url(data:font/woff;charset=utf-8;base64,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) format('woff'); -} - -body { - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - text-size-adjust: 100%; - color: #333; - font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif; - font-size: 16px; - line-height: 1.6; - word-wrap: break-word; - padding: 1em; -} - -a { - background-color: transparent; -} - -a:active, -a:hover { - outline: 0; -} - -strong { - font-weight: bold; -} - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -img { - border: 0; -} - -hr { - box-sizing: content-box; - height: 0; -} - -pre { - overflow: auto; -} - -code, -kbd, -pre { - font-family: monospace, monospace; - font-size: 1em; -} - -input { - color: inherit; - font: inherit; - margin: 0; -} - -html input[disabled] { - cursor: default; -} - -input { - line-height: normal; -} - -input[type="checkbox"] { - box-sizing: border-box; - padding: 0; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} - -* { - box-sizing: border-box; -} - -input { - font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; -} - -a { - color: #4078c0; - text-decoration: none; -} - -a:hover, -a:active { - text-decoration: underline; -} - -hr { - height: 0; - margin: 15px 0; - overflow: hidden; - background: transparent; - border: 0; - border-bottom: 1px solid #ddd; -} - -hr:before { - display: table; - content: ""; -} - -hr:after { - display: table; - clear: both; - content: ""; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin-top: 15px; - margin-bottom: 15px; - line-height: 1.1; -} - -h1 { - font-size: 30px; -} -h1:first-child { - margin-top: 0; -} - -h2 { - font-size: 21px; -} - -h3 { - font-size: 16px; -} - -h4 { - font-size: 14px; -} - -h5 { - font-size: 12px; -} - -h6 { - font-size: 11px; -} - -blockquote { - margin: 0; -} - -ul, -ol { - padding: 0; - margin-top: 0; - margin-bottom: 0; -} - -ol ol, -ul ol { - list-style-type: lower-roman; -} - -ul ul ol, -ul ol ol, -ol ul ol, -ol ol ol { - list-style-type: lower-alpha; -} - -dd { - margin-left: 0; -} - -code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 12px; -} - -pre { - margin-top: 0; - margin-bottom: 0; - font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; -} - -.octicon { - font: normal normal normal 16px/1 octicons-anchor; - display: inline-block; - text-decoration: none; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.octicon-link:before { - content: '\f05c'; -} - -.markdown-body>*:first-child { - margin-top: 0 !important; -} - -.markdown-body>*:last-child { - margin-bottom: 0 !important; -} - -a:not([href]) { - cursor: pointer; - text-decoration: none; -} - -.anchor { - position: absolute; - top: 0; - left: 0; - display: block; - padding-right: 6px; - padding-left: 30px; - margin-left: -30px; -} - -.anchor:focus { - outline: none; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - position: relative; - margin-top: 1em; - margin-bottom: 16px; - font-weight: bold; - line-height: 1.4; -} - -h1 .octicon-link, -h2 .octicon-link, -h3 .octicon-link, -h4 .octicon-link, -h5 .octicon-link, -h6 .octicon-link { - display: none; - color: #000; - vertical-align: middle; -} - -h1:hover .anchor, -h2:hover .anchor, -h3:hover .anchor, -h4:hover .anchor, -h5:hover .anchor, -h6:hover .anchor { - padding-left: 8px; - margin-left: -30px; - text-decoration: none; -} - -h1:hover .anchor .octicon-link, -h2:hover .anchor .octicon-link, -h3:hover .anchor .octicon-link, -h4:hover .anchor .octicon-link, -h5:hover .anchor .octicon-link, -h6:hover .anchor .octicon-link { - display: inline-block; -} - -h1 { - padding-bottom: 0.3em; - font-size: 2.25em; - line-height: 1.2; - border-bottom: 1px solid #eee; -} - -h1 .anchor { - line-height: 1; -} - -h2 { - padding-bottom: 0.3em; - font-size: 1.75em; - line-height: 1.225; - border-bottom: 1px solid #eee; -} - -h2 .anchor { - line-height: 1; -} - -h3 { - font-size: 1.5em; - line-height: 1.43; -} - -h3 .anchor { - line-height: 1.2; -} - -h4 { - font-size: 1.25em; -} - -h4 .anchor { - line-height: 1.2; -} - -h5 { - font-size: 1em; -} - -h5 .anchor { - line-height: 1.1; -} - -h6 { - font-size: 1em; - color: #777; -} - -h6 .anchor { - line-height: 1.1; -} - -p, -blockquote, -ul, -ol, -dl, -table, -pre { - margin-top: 0; - margin-bottom: 16px; -} - -hr { - height: 4px; - padding: 0; - margin: 16px 0; - background-color: #e7e7e7; - border: 0 none; -} - -ul, -ol { - padding-left: 2em; -} - -ul ul, -ul ol, -ol ol, -ol ul { - margin-top: 0; - margin-bottom: 0; -} - -li>p { - margin-top: 16px; -} - -dl { - padding: 0; -} - -dl dt { - padding: 0; - margin-top: 16px; - font-size: 1em; - font-style: italic; - font-weight: bold; -} - -dl dd { - padding: 0 16px; - margin-bottom: 16px; -} - -blockquote { - padding: 0 15px; - color: #777; - border-left: 4px solid #ddd; -} - -blockquote>:first-child { - margin-top: 0; -} - -blockquote>:last-child { - margin-bottom: 0; -} - -table { - display: block; - width: 100%; - overflow: auto; - word-break: normal; - word-break: keep-all; -} - -table th { - font-weight: bold; -} - -table th, -table td { - padding: 6px 13px; - border: 1px solid #ddd; -} - -table tr { - background-color: #fff; - border-top: 1px solid #ccc; -} - -table tr:nth-child(2n) { - background-color: #f8f8f8; -} - -img { - max-width: 100%; - box-sizing: border-box; -} - -code { - padding: 0; - padding-top: 0.2em; - padding-bottom: 0.2em; - margin: 0; - font-size: 85%; - background-color: rgba(0,0,0,0.04); - border-radius: 3px; -} - -code:before, -code:after { - letter-spacing: -0.2em; - content: "\00a0"; -} - -pre>code { - padding: 0; - margin: 0; - font-size: 100%; - word-break: normal; - white-space: pre; - background: transparent; - border: 0; -} - -.highlight { - margin-bottom: 16px; -} - -.highlight pre, -pre { - padding: 16px; - overflow: auto; - font-size: 85%; - line-height: 1.45; - background-color: #f7f7f7; - border-radius: 3px; -} - -.highlight pre { - margin-bottom: 0; - word-break: normal; -} - -pre { - word-wrap: normal; -} - -pre code { - display: inline; - max-width: initial; - padding: 0; - margin: 0; - overflow: initial; - line-height: inherit; - word-wrap: normal; - background-color: transparent; - border: 0; -} - -pre code:before, -pre code:after { - content: normal; -} - -kbd { - display: inline-block; - padding: 3px 5px; - font-size: 11px; - line-height: 10px; - color: #555; - vertical-align: middle; - background-color: #fcfcfc; - border: solid 1px #ccc; - border-bottom-color: #bbb; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #bbb; -} - -kbd { - display: inline-block; - padding: 3px 5px; - font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; - line-height: 10px; - color: #555; - vertical-align: middle; - background-color: #fcfcfc; - border: solid 1px #ccc; - border-bottom-color: #bbb; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #bbb; -} - -.task-list-item { - list-style-type: none; -} - -.task-list-item+.task-list-item { - margin-top: 3px; -} - -.task-list-item input { - margin: 0 0.35em 0.25em -1.6em; - vertical-align: middle; -} - -:checked+.radio-label { - z-index: 1; - position: relative; - border-color: #4078c0; -} diff --git a/benchmarks/dbmon/ENV.js b/benchmarks/dbmon/ENV.js deleted file mode 100644 index 2559b7a..0000000 --- a/benchmarks/dbmon/ENV.js +++ /dev/null @@ -1,211 +0,0 @@ -var ENV = ENV || (function() { - - var first = true; - var counter = 0; - var data; - var _base; - (_base = String.prototype).lpad || (_base.lpad = function(padding, toLength) { - return padding.repeat((toLength - this.length) / padding.length).concat(this); - }); - - function formatElapsed(value) { - var str = parseFloat(value).toFixed(2); - if (value > 60) { - minutes = Math.floor(value / 60); - comps = (value % 60).toFixed(2).split('.'); - seconds = comps[0].lpad('0', 2); - ms = comps[1]; - str = minutes + ":" + seconds + "." + ms; - } - return str; - } - - function getElapsedClassName(elapsed) { - var className = 'Query elapsed'; - if (elapsed >= 10.0) { - className += ' warn_long'; - } - else if (elapsed >= 1.0) { - className += ' warn'; - } - else { - className += ' short'; - } - return className; - } - - function countClassName(queries) { - var countClassName = "label"; - if (queries >= 20) { - countClassName += " label-important"; - } - else if (queries >= 10) { - countClassName += " label-warning"; - } - else { - countClassName += " label-success"; - } - return countClassName; - } - - function updateQuery(object) { - if (!object) { - object = {}; - } - var elapsed = Math.random() * 15; - object.elapsed = elapsed; - object.formatElapsed = formatElapsed(elapsed); - object.elapsedClassName = getElapsedClassName(elapsed); - object.query = "SELECT blah FROM something"; - object.waiting = Math.random() < 0.5; - if (Math.random() < 0.2) { - object.query = " in transaction"; - } - if (Math.random() < 0.1) { - object.query = "vacuum"; - } - return object; - } - - function cleanQuery(value) { - if (value) { - value.formatElapsed = ""; - value.elapsedClassName = ""; - value.query = ""; - value.elapsed = null; - value.waiting = null; - } else { - return { - query: "***", - formatElapsed: "", - elapsedClassName: "" - }; - } - } - - function generateRow(object, keepIdentity, counter) { - var nbQueries = Math.floor((Math.random() * 10) + 1); - if (!object) { - object = {}; - } - object.lastMutationId = counter; - object.nbQueries = nbQueries; - if (!object.lastSample) { - object.lastSample = {}; - } - if (!object.lastSample.topFiveQueries) { - object.lastSample.topFiveQueries = []; - } - if (keepIdentity) { - // for Angular optimization - if (!object.lastSample.queries) { - object.lastSample.queries = []; - for (var l = 0; l < 12; l++) { - object.lastSample.queries[l] = cleanQuery(); - } - } - for (var j in object.lastSample.queries) { - var value = object.lastSample.queries[j]; - if (j <= nbQueries) { - updateQuery(value); - } else { - cleanQuery(value); - } - } - } else { - object.lastSample.queries = []; - for (var j = 0; j < 12; j++) { - if (j < nbQueries) { - var value = updateQuery(cleanQuery()); - object.lastSample.queries.push(value); - } else { - object.lastSample.queries.push(cleanQuery()); - } - } - } - for (var i = 0; i < 5; i++) { - var source = object.lastSample.queries[i]; - object.lastSample.topFiveQueries[i] = source; - } - object.lastSample.nbQueries = nbQueries; - object.lastSample.countClassName = countClassName(nbQueries); - return object; - } - - function getData(keepIdentity) { - var oldData = data; - if (!keepIdentity) { // reset for each tick when !keepIdentity - data = []; - for (var i = 1; i <= ENV.rows; i++) { - data.push({ dbname: 'cluster' + i, query: "", formatElapsed: "", elapsedClassName: "" }); - data.push({ dbname: 'cluster' + i + ' slave', query: "", formatElapsed: "", elapsedClassName: "" }); - } - } - if (!data) { // first init when keepIdentity - data = []; - for (var i = 1; i <= ENV.rows; i++) { - data.push({ dbname: 'cluster' + i }); - data.push({ dbname: 'cluster' + i + ' slave' }); - } - oldData = data; - } - for (var i in data) { - var row = data[i]; - if (!keepIdentity && oldData && oldData[i]) { - row.lastSample = oldData[i].lastSample; - } - if (!row.lastSample || Math.random() < ENV.mutations()) { - counter = counter + 1; - if (!keepIdentity) { - row.lastSample = null; - } - generateRow(row, keepIdentity, counter); - } else { - data[i] = oldData[i]; - } - } - first = false; - return { - toArray: function() { - return data; - } - }; - } - - var mutationsValue = 0.5; - - function mutations(value) { - if (value) { - mutationsValue = value; - return mutationsValue; - } else { - return mutationsValue; - } - } - - var body = document.querySelector('body'); - var theFirstChild = body.firstChild; - - var sliderContainer = document.createElement( 'div' ); - sliderContainer.style.cssText = "display: flex"; - var slider = document.createElement('input'); - var text = document.createElement('label'); - text.innerHTML = 'mutations : ' + (mutationsValue * 100).toFixed(0) + '%'; - text.id = "ratioval"; - slider.setAttribute("type", "range"); - slider.style.cssText = 'margin-bottom: 10px; margin-top: 5px'; - slider.addEventListener('change', function(e) { - ENV.mutations(e.target.value / 100); - document.querySelector('#ratioval').innerHTML = 'mutations : ' + (ENV.mutations() * 100).toFixed(0) + '%'; - }); - sliderContainer.appendChild( text ); - sliderContainer.appendChild( slider ); - body.insertBefore( sliderContainer, theFirstChild ); - - return { - generateData: getData, - rows: 50, - timeout: 0, - mutations: mutations - }; -})(); diff --git a/benchmarks/dbmon/app.js b/benchmarks/dbmon/app.js deleted file mode 100644 index 61950d3..0000000 --- a/benchmarks/dbmon/app.js +++ /dev/null @@ -1,14 +0,0 @@ -var app = new Vue({ - el: '#app', - data: { - databases: [] - } -}) - -function loadSamples() { - app.databases = Object.freeze(ENV.generateData().toArray()); - Monitoring.renderRate.ping(); - setTimeout(loadSamples, ENV.timeout); -} - -loadSamples() diff --git a/benchmarks/dbmon/index.html b/benchmarks/dbmon/index.html deleted file mode 100644 index e784bb4..0000000 --- a/benchmarks/dbmon/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - -dbmon (Vue) - - -

- Reference: js-repaint-perfs -

-
- - - - - - - - -
{{db.dbname}} - {{db.lastSample.nbQueries}} - - {{q.formatElapsed}} -
-
{{q.query}}
-
-
-
-
- - - - - - - - diff --git a/benchmarks/dbmon/lib/memory-stats.js b/benchmarks/dbmon/lib/memory-stats.js deleted file mode 100644 index df75fb3..0000000 --- a/benchmarks/dbmon/lib/memory-stats.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @author mrdoob / http://mrdoob.com/ - * @author jetienne / http://jetienne.com/ - * @author paulirish / http://paulirish.com/ - */ -var MemoryStats = function (){ - - var msMin = 100; - var msMax = 0; - - var container = document.createElement( 'div' ); - container.id = 'stats'; - container.style.cssText = 'width:80px;opacity:0.9;cursor:pointer'; - - var msDiv = document.createElement( 'div' ); - msDiv.id = 'ms'; - msDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#020;'; - container.appendChild( msDiv ); - - var msText = document.createElement( 'div' ); - msText.id = 'msText'; - msText.style.cssText = 'color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px'; - msText.innerHTML= 'Memory'; - msDiv.appendChild( msText ); - - var msGraph = document.createElement( 'div' ); - msGraph.id = 'msGraph'; - msGraph.style.cssText = 'position:relative;width:74px;height:30px;background-color:#0f0'; - msDiv.appendChild( msGraph ); - - while ( msGraph.children.length < 74 ) { - - var bar = document.createElement( 'span' ); - bar.style.cssText = 'width:1px;height:30px;float:left;background-color:#131'; - msGraph.appendChild( bar ); - - } - - var updateGraph = function ( dom, height, color ) { - - var child = dom.appendChild( dom.firstChild ); - child.style.height = height + 'px'; - if( color ) child.style.backgroundColor = color; - - } - - var perf = window.performance || {}; - // polyfill usedJSHeapSize - if (!perf && !perf.memory){ - perf.memory = { usedJSHeapSize : 0 }; - } - if (perf && !perf.memory){ - perf.memory = { usedJSHeapSize : 0 }; - } - - // support of the API? - if( perf.memory.totalJSHeapSize === 0 ){ - console.warn('totalJSHeapSize === 0... performance.memory is only available in Chrome .') - } - - // TODO, add a sanity check to see if values are bucketed. - // If so, reminde user to adopt the --enable-precise-memory-info flag. - // open -a "/Applications/Google Chrome.app" --args --enable-precise-memory-info - - var lastTime = Date.now(); - var lastUsedHeap= perf.memory.usedJSHeapSize; - return { - domElement: container, - - update: function () { - - // refresh only 30time per second - if( Date.now() - lastTime < 1000/30 ) return; - lastTime = Date.now() - - var delta = perf.memory.usedJSHeapSize - lastUsedHeap; - lastUsedHeap = perf.memory.usedJSHeapSize; - var color = delta < 0 ? '#830' : '#131'; - - var ms = perf.memory.usedJSHeapSize; - msMin = Math.min( msMin, ms ); - msMax = Math.max( msMax, ms ); - msText.textContent = "Mem: " + bytesToSize(ms, 2); - - var normValue = ms / (30*1024*1024); - var height = Math.min( 30, 30 - normValue * 30 ); - updateGraph( msGraph, height, color); - - function bytesToSize( bytes, nFractDigit ){ - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return 'n/a'; - nFractDigit = nFractDigit !== undefined ? nFractDigit : 0; - var precision = Math.pow(10, nFractDigit); - var i = Math.floor(Math.log(bytes) / Math.log(1024)); - return Math.round(bytes*precision / Math.pow(1024, i))/precision + ' ' + sizes[i]; - }; - } - - } - -}; \ No newline at end of file diff --git a/benchmarks/dbmon/lib/monitor.js b/benchmarks/dbmon/lib/monitor.js deleted file mode 100644 index dccad19..0000000 --- a/benchmarks/dbmon/lib/monitor.js +++ /dev/null @@ -1,60 +0,0 @@ -var Monitoring = Monitoring || (function() { - - var stats = new MemoryStats(); - stats.domElement.style.position = 'fixed'; - stats.domElement.style.right = '0px'; - stats.domElement.style.bottom = '0px'; - document.body.appendChild( stats.domElement ); - requestAnimationFrame(function rAFloop(){ - stats.update(); - requestAnimationFrame(rAFloop); - }); - - var RenderRate = function () { - var container = document.createElement( 'div' ); - container.id = 'stats'; - container.style.cssText = 'width:150px;opacity:0.9;cursor:pointer;position:fixed;right:80px;bottom:0px;'; - - var msDiv = document.createElement( 'div' ); - msDiv.id = 'ms'; - msDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#020;'; - container.appendChild( msDiv ); - - var msText = document.createElement( 'div' ); - msText.id = 'msText'; - msText.style.cssText = 'color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px'; - msText.innerHTML= 'Repaint rate: 0/sec'; - msDiv.appendChild( msText ); - - var bucketSize = 20; - var bucket = []; - var lastTime = Date.now(); - return { - domElement: container, - ping: function () { - var start = lastTime; - var stop = Date.now(); - var rate = 1000 / (stop - start); - bucket.push(rate); - if (bucket.length > bucketSize) { - bucket.shift(); - } - var sum = 0; - for (var i = 0; i < bucket.length; i++) { - sum = sum + bucket[i]; - } - msText.textContent = "Repaint rate: " + (sum / bucket.length).toFixed(2) + "/sec"; - lastTime = stop; - } - } - }; - - var renderRate = new RenderRate(); - document.body.appendChild( renderRate.domElement ); - - return { - memoryStats: stats, - renderRate: renderRate - }; - -})(); diff --git a/benchmarks/dbmon/lib/styles.css b/benchmarks/dbmon/lib/styles.css deleted file mode 100644 index da43dd9..0000000 --- a/benchmarks/dbmon/lib/styles.css +++ /dev/null @@ -1,26 +0,0 @@ -body {color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;margin:0;} -label {display:inline-block;font-weight:700;margin-bottom:5px;} -input[type=range] {display:block;width:100%;} -table {border-collapse:collapse;border-spacing:0;} -:before,:after {box-sizing: border-box;} - -.table > thead > tr > th,.table > tbody > tr > th,.table > tfoot > tr > th,.table > thead > tr > td,.table > tbody > tr > td,.table > tfoot > tr > td {border-top:1px solid #ddd;line-height:1.42857143;padding:8px;vertical-align:top;} -.table {width:100%;} -.table-striped > tbody > tr:nth-child(odd) > td,.table-striped > tbody > tr:nth-child(odd) > th {background:#f9f9f9;} - -.label {border-radius:.25em;color:#fff;display:inline;font-size:75%;font-weight:700;line-height:1;padding:.2em .6em .3em;text-align:center;vertical-align:baseline;white-space:nowrap;} -.label-success {background-color:#5cb85c;} -.label-warning {background-color:#f0ad4e;} - -.popover {background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);display:none;left:0;max-width:276px;padding:1px;position:absolute;text-align:left;top:0;white-space:normal;z-index:1010;} -.popover>.arrow:after {border-width:10px;content:"";} -.popover.left {margin-left:-10px;} -.popover.left > .arrow {border-right-width:0;border-left-color:rgba(0,0,0,.25);margin-top:-11px;right:-11px;top:50%;} -.popover.left > .arrow:after {border-left-color:#fff;border-right-width:0;bottom:-10px;content:" ";right:1px;} -.popover > .arrow {border-width:11px;} -.popover > .arrow,.popover>.arrow:after {border-color:transparent;border-style:solid;display:block;height:0;position:absolute;width:0;} - -.popover-content {padding:9px 14px;} - -.Query {position:relative;} -.Query:hover .popover {display:block;left:-100%;width:100%;} diff --git a/benchmarks/reorder-list/index.html b/benchmarks/reorder-list/index.html deleted file mode 100644 index 81b5a26..0000000 --- a/benchmarks/reorder-list/index.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - Vue benchmark - - - - - - - - - - -
-
- - - - diff --git a/benchmarks/ssr/README.md b/benchmarks/ssr/README.md deleted file mode 100644 index 1058bcb..0000000 --- a/benchmarks/ssr/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Vue.js SSR benchmark - -This benchmark renders a table of 1000 rows with 10 columns (10k components), with around 30k normal elements on the page. Note this is not something likely to be seen in a typical app. This benchmark is mostly for stress/regression testing and comparing between `renderToString` and `renderToStream`. - -To view the results follow the run section. Note that the overall completion time for the results are variable, this is due to other system related variants at run time (available memory, processing ect). In ideal circumstances both should finish within similar results. - -`renderToStream` pipes the content through a stream which provides considerable performance benefits (faster time-to-first-byte and non-event-loop-blocking) over renderToString. This can be observed through the benchmark. - -### run - -``` bash -npm run bench:ssr -``` diff --git a/benchmarks/ssr/common.js b/benchmarks/ssr/common.js deleted file mode 100644 index 4ce56fb..0000000 --- a/benchmarks/ssr/common.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -const self = (global || root) - -self.performance = { - now: function () { - var hrtime = process.hrtime() - return ((hrtime[0] * 1000000 + hrtime[1] / 1000) / 1000) - } -} - -function generateGrid (rowCount, columnCount) { - var grid = [] - - for (var r = 0; r < rowCount; r++) { - var row = { id: r, items: [] } - for (var c = 0; c < columnCount; c++) { - row.items.push({ id: (r + '-' + c) }) - } - grid.push(row) - } - - return grid -} - -const gridData = generateGrid(1000, 10) - -module.exports = { - template: '

{{ Math.random() }}

', - components: { - myTable: { - data: function () { - return { - grid: gridData - } - }, - // template: '
123{{ item.id }}
', - template: '
', - components: { - row: { - props: ['row'], - template: '{{ Math.random() }}', - components: { - column: { - template: '' + - // 25 plain elements for each cell - '' + - '' - } - } - } - } - } - } -} diff --git a/benchmarks/ssr/renderToStream.js b/benchmarks/ssr/renderToStream.js deleted file mode 100644 index 74ca103..0000000 --- a/benchmarks/ssr/renderToStream.js +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint-disable no-unused-vars */ - -'use strict' - -process.env.NODE_ENV = 'production' - -const Vue = require('../../dist/vue.runtime.common.js') -const createRenderer = require('../../packages/vue-server-renderer').createRenderer -const renderToStream = createRenderer().renderToStream -const gridComponent = require('./common.js') - -console.log('--- renderToStream --- ') -const self = (global || root) -const s = self.performance.now() - -const stream = renderToStream(new Vue(gridComponent)) -let str = '' -let first -let complete -stream.once('data', () => { - first = self.performance.now() - s -}) -stream.on('data', chunk => { - str += chunk -}) -stream.on('end', () => { - complete = self.performance.now() - s - console.log(`first chunk: ${first.toFixed(2)}ms`) - console.log(`complete: ${complete.toFixed(2)}ms`) - console.log() -}) diff --git a/benchmarks/ssr/renderToString.js b/benchmarks/ssr/renderToString.js deleted file mode 100644 index dbd6307..0000000 --- a/benchmarks/ssr/renderToString.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -process.env.NODE_ENV = 'production' - -const Vue = require('../../dist/vue.runtime.common.js') -const createRenderer = require('../../packages/vue-server-renderer').createRenderer -const renderToString = createRenderer().renderToString -const gridComponent = require('./common.js') - -console.log('--- renderToString --- ') -const self = (global || root) -self.s = self.performance.now() - -renderToString(new Vue(gridComponent), () => { - console.log('Complete time: ' + (self.performance.now() - self.s).toFixed(2) + 'ms') - console.log() -}) diff --git a/benchmarks/svg/index.html b/benchmarks/svg/index.html deleted file mode 100644 index cd274cb..0000000 --- a/benchmarks/svg/index.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - vue.js version - - - - - -

Animating 1000 SVG dots

-
-

- -

- - - -
- - - diff --git a/benchmarks/uptime/index.html b/benchmarks/uptime/index.html deleted file mode 100644 index 4a37515..0000000 --- a/benchmarks/uptime/index.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - Vue benchmark - - - -

Reference: Ember Glimmer 2 demo

-
-

FPS: {{ fps }}

- - - -
- - - -