-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.