1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-06-15 03:35:16 +00:00

added benchmark in version 1 too

This commit is contained in:
Andrea Giammarchi 2016-03-02 11:00:58 +00:00
parent fef8f6de06
commit 7d3de547c0
3 changed files with 31 additions and 3 deletions

View File

@ -691,6 +691,8 @@
<li>&#x1F63E;</li>
<li>&#x1F63F;</li>
<li>&#x1F640;</li>
<li>&#x1F641;</li>
<li>&#x1F642;</li>
<li>&#x1F645;</li>
<li>&#x1F646;</li>
<li>&#x1F647;</li>
@ -903,7 +905,15 @@
<li>&#xE50A;</li>
</ul>
<script>
twemoji.parse(document.getElementsByTagName('ul')[0], {"folder":"svg","ext":".svg","base":""});
var ul = document.getElementsByTagName('ul')[0];
var total = ul.getElementsByTagName('li').length;
var elapsed = +new Date;
twemoji.parse(ul, {"folder":"svg","ext":".svg","base":""});
elapsed = (+new Date) - elapsed;
document.body.insertBefore(
document.createTextNode(total + ' emoji parsed in ' + elapsed + 'ms'),
document.body.firstChild
);
(function (img, metaKey, i) {
function copyToClipboard(e) {
prompt('Copy to clipboard via ' + metaKey + '+C and Enter', this.alt);

View File

@ -32,7 +32,15 @@
{{emoji-list}}
</ul>
<script>
twemoji.parse(document.getElementsByTagName('ul')[0], {{emoji-options}});
var ul = document.getElementsByTagName('ul')[0];
var total = ul.getElementsByTagName('li').length;
var elapsed = +new Date;
twemoji.parse(ul, {{emoji-options}});
elapsed = (+new Date) - elapsed;
document.body.insertBefore(
document.createTextNode(total + ' emoji parsed in ' + elapsed + 'ms'),
document.body.firstChild
);
(function (img, metaKey, i) {
function copyToClipboard(e) {
prompt('Copy to clipboard via ' + metaKey + '+C and Enter', this.alt);

View File

@ -691,6 +691,8 @@
<li>&#x1F63E;</li>
<li>&#x1F63F;</li>
<li>&#x1F640;</li>
<li>&#x1F641;</li>
<li>&#x1F642;</li>
<li>&#x1F645;</li>
<li>&#x1F646;</li>
<li>&#x1F647;</li>
@ -903,7 +905,15 @@
<li>&#xE50A;</li>
</ul>
<script>
twemoji.parse(document.getElementsByTagName('ul')[0], {"size":72});
var ul = document.getElementsByTagName('ul')[0];
var total = ul.getElementsByTagName('li').length;
var elapsed = +new Date;
twemoji.parse(ul, {"size":72});
elapsed = (+new Date) - elapsed;
document.body.insertBefore(
document.createTextNode(total + ' emoji parsed in ' + elapsed + 'ms'),
document.body.firstChild
);
(function (img, metaKey, i) {
function copyToClipboard(e) {
prompt('Copy to clipboard via ' + metaKey + '+C and Enter', this.alt);