Closed
Description
E.g. http://tomaka.github.io/cpal/alsa-sys/index.html
Resizing two windows that show this site causes 3-5 seconds of 100% cpu usage on two cores.
Solution: Remove responsive javascript to make the site more responsive.
function resizeShortBlocks() {
if (resizeTimeout) {
clearTimeout(resizeTimeout);
}
resizeTimeout = setTimeout(function() {
var contentWidth = $('.content').width();
$('.docblock.short').width(function() {
return contentWidth - 40 - $(this).prev().width();
}).addClass('nowrap');
$('.summary-column').width(function() {
return contentWidth - 40 - $(this).prev().width();
})
}, 150);
}
resizeShortBlocks();
$(window).on('resize', resizeShortBlocks);
But that's not all: When you load this site for the first time, it doesn't even react to any user input for 5 seconds.