summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorsfranklin2012-02-22 20:51:03 (EST)
committer Simon Kaegi2012-02-23 10:24:19 (EST)
commitbf46a750c0dde5f5f405d7c11b9cfe965800f5bc (patch)
treee234dc09e2baa291fc2bfa20e3d56b86d19da08d
parentc55272278f8abfd4e5a5877178c8146a7e4e417d (diff)
downloadorg.eclipse.orion.client-bf46a750c0dde5f5f405d7c11b9cfe965800f5bc.zip
org.eclipse.orion.client-bf46a750c0dde5f5f405d7c11b9cfe965800f5bc.tar.gz
org.eclipse.orion.client-bf46a750c0dde5f5f405d7c11b9cfe965800f5bc.tar.bz2
Bug 372182 - Performance of CommandService.renderCommands needs to be addressed
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js b/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
index 72b01bb..e76405a 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
@@ -9,7 +9,7 @@
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/
-/*global define */
+/*global define window */
/*jslint regexp:false browser:true forin:true*/
define(['require', 'dojo', 'orion/util', 'orion/explorer', 'orion/explorerNavHandler', 'orion/breadcrumbs', 'orion/fileCommands', 'orion/extensionCommands', 'orion/contentTypes', 'dojo/number'],
@@ -162,7 +162,13 @@ define(['require', 'dojo', 'orion/util', 'orion/explorer', 'orion/explorerNavHan
addImageToLink(contentType, link);
dojo.place(document.createTextNode(item.Name), link, "last");
}
- this.explorer.registry.getService("orion.page.command").renderCommands(span, "object", item, this.explorer, "tool", false, null, "commandActiveItem", "commandInactiveItem");
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=372182
+ // use a timeout so rendering is non-blocking. But we need to set a height on the parent span
+ // to reduce ripple everywhere else
+ dojo.style(span, {height: "28px", display: "inline-block"});
+ window.setTimeout(dojo.hitch(this, function() {
+ this.commandService.renderCommands(span, "object", item, this.explorer, "tool", false);
+ }), 0);
return col;
case 1:
var dateColumn = document.createElement('td');