From 335aa624a58efa4de3cfca1d7280c8a2f4d435ad Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Mon, 9 Dec 2013 18:25:38 -0500 Subject: [PATCH] Inefficient to call Behaviour.applySubtree on rows we added earlier. --- .../resources/lib/hudson/buildListTable.jelly | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/core/src/main/resources/lib/hudson/buildListTable.jelly b/core/src/main/resources/lib/hudson/buildListTable.jelly index 2c4bb71578..7bdd1118dc 100644 --- a/core/src/main/resources/lib/hudson/buildListTable.jelly +++ b/core/src/main/resources/lib/hudson/buildListTable.jelly @@ -48,26 +48,26 @@ THE SOFTWARE. var p = $$('projectStatus'); for (var x = 0; data.length > x; x++) { var e = data[x]; - p. - insert(new Element('tr'). - insert(new Element('td', {data: e.iconColorOrdinal}). - insert(new Element('a', {href: '${jobBaseUrl}' + e.url}). - insert(new Element('img', {src: '${imagesURL}/${iconSize}/' + e.buildStatusUrl, alt: e.iconColorDescription, 'class': 'icon${iconSize}'})))). - insert(new Element('td'). - insert(new Element('a', {href: '${jobBaseUrl}' + e.parentUrl, 'class': 'model-link'}). - update(e.parentFullDisplayName)). - insert('\u00A0'). - insert(new Element('a', {href: '${jobBaseUrl}' + e.url, 'class': 'model-link inside'}). - update(e.displayName.escapeHTML()))). - insert(new Element('td', {data: e.timestampString2, tooltip: '${%Click to center timeline on event}', onclick: 'javascript:tl.getBand(0).scrollToCenter(Timeline.DateTime.parseGregorianDateTime("' + e.timestampString2 + '"))'}). - update(e.timestampString.escapeHTML())). - insert(new Element('td', {style: e.buildStatusSummaryWorse ? 'color: red' : ''}). - update(e.buildStatusSummaryMessage.escapeHTML())). - insert(new Element('td'). - insert(new Element('a', {href: '${jobBaseUrl}' + e.url + 'console'}). - insert(new Element('img', {src: '${imagesURL}/${subIconSize}/terminal.png', alt: '${%Console output}', border: 0}))))); + var tr = new Element('tr'). + insert(new Element('td', {data: e.iconColorOrdinal}). + insert(new Element('a', {href: '${jobBaseUrl}' + e.url}). + insert(new Element('img', {src: '${imagesURL}/${iconSize}/' + e.buildStatusUrl, alt: e.iconColorDescription, 'class': 'icon${iconSize}'})))). + insert(new Element('td'). + insert(new Element('a', {href: '${jobBaseUrl}' + e.parentUrl, 'class': 'model-link'}). + update(e.parentFullDisplayName)). + insert('\u00A0'). + insert(new Element('a', {href: '${jobBaseUrl}' + e.url, 'class': 'model-link inside'}). + update(e.displayName.escapeHTML()))). + insert(new Element('td', {data: e.timestampString2, tooltip: '${%Click to center timeline on event}', onclick: 'javascript:tl.getBand(0).scrollToCenter(Timeline.DateTime.parseGregorianDateTime("' + e.timestampString2 + '"))'}). + update(e.timestampString.escapeHTML())). + insert(new Element('td', {style: e.buildStatusSummaryWorse ? 'color: red' : ''}). + update(e.buildStatusSummaryMessage.escapeHTML())). + insert(new Element('td'). + insert(new Element('a', {href: '${jobBaseUrl}' + e.url + 'console'}). + insert(new Element('img', {src: '${imagesURL}/${subIconSize}/terminal.png', alt: '${%Console output}', border: 0})))); + p.insert(tr); + Behaviour.applySubtree(tr); } - Behaviour.applySubtree(p); }