Editor: faster page load

This commit is contained in:
tophf 2015-07-29 20:45:54 +03:00
parent bbddba9532
commit 6d5637e69a

View File

@ -952,8 +952,8 @@ function initWithStyle(style) {
});
var queue = style.sections.length ? style.sections : [{code: ""}];
var queueStart = new Date().getTime();
// after 200ms the sections will be added asynchronously
while (new Date().getTime() - queueStart <= 200 && queue.length) {
// after 100ms the sections will be added asynchronously
while (new Date().getTime() - queueStart <= 100 && queue.length) {
maximizeCodeHeight(addSection(null, queue.shift()), !queue.length);
}
if (queue.length) {