Commit ec99c957 authored by Neil Fraser's avatar Neil Fraser

Speed up unhiding of workspace with large numbers of blocks.

parent 2f300349
......@@ -380,11 +380,11 @@ Blockly.WorkspaceSvg.prototype.setVisible = function(isVisible) {
* Render all blocks in workspace.
*/
Blockly.WorkspaceSvg.prototype.render = function() {
var renderList = this.getAllBlocks();
for (var i = 0, block; block = renderList[i]; i++) {
if (!block.getChildren().length) {
block.render();
}
// Generate list of all blocks.
var blocks = this.getAllBlocks();
// Render each block.
for (var i = blocks.length - 1; i >= 0; i--) {
blocks[i].render(false);
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment