From 557fee24fb0511c3eb8480ce7630811f9c34a517 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Mon, 11 Sep 2006 13:55:19 +0000 Subject: [PATCH] Reduce the amount of CPU an undetermined progressmeter consumes b=279465 r=mconnor sr=jag --- toolkit/content/widgets/progressmeter.xml | 9 +++++---- xpfe/global/resources/content/bindings/progressmeter.xml | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/toolkit/content/widgets/progressmeter.xml b/toolkit/content/widgets/progressmeter.xml index 1a8e69fad93..3b0c28fa308 100644 --- a/toolkit/content/widgets/progressmeter.xml +++ b/toolkit/content/widgets/progressmeter.xml @@ -69,16 +69,17 @@ var position = -1; var interval = setInterval(function nextStep() { try { + var width = stack.boxObject.width >> 2; spacer.height = stack.boxObject.height; - spacer.width = stack.boxObject.width >> 2; - spacer.left = spacer.width * position; - position += 30 / (stack.boxObject.width + 600); + spacer.width = width; + spacer.left = width * position; + position += 15 / (width + 150); if (position >= 4) position = -1; } catch (e) { clearInterval(interval); } - }, 10); + }, 20); ]]> diff --git a/xpfe/global/resources/content/bindings/progressmeter.xml b/xpfe/global/resources/content/bindings/progressmeter.xml index 1a8e69fad93..3b0c28fa308 100644 --- a/xpfe/global/resources/content/bindings/progressmeter.xml +++ b/xpfe/global/resources/content/bindings/progressmeter.xml @@ -69,16 +69,17 @@ var position = -1; var interval = setInterval(function nextStep() { try { + var width = stack.boxObject.width >> 2; spacer.height = stack.boxObject.height; - spacer.width = stack.boxObject.width >> 2; - spacer.left = spacer.width * position; - position += 30 / (stack.boxObject.width + 600); + spacer.width = width; + spacer.left = width * position; + position += 15 / (width + 150); if (position >= 4) position = -1; } catch (e) { clearInterval(interval); } - }, 10); + }, 20); ]]>