1
0
mirror of synced 2025-12-09 15:24:28 +08:00

perf(console): asynchronize log render

This commit is contained in:
redhoodsu
2019-10-26 12:29:17 +08:00
parent e63387bdb8
commit 119fdf6ef8
4 changed files with 25 additions and 2 deletions

View File

@@ -42,6 +42,9 @@
<li>
<a href="#" id="log">Log</a>
</li>
<li>
<a href="#" id="heavy-log">Heavy Log</a>
</li>
</ul>
</nav>
<script>
@@ -162,6 +165,11 @@
for (var i = 0; i < 10000; i++) arr.push(i);
console.log(arr);
});
addClickEvent('heavy-log', () => {
for (let i = 0; i < 1000; i++) {
console.log(location, i);
}
});
</script>
<script>
eruda.init();