Bug 142172 [Wizards] Small overhead in WizardDialog
Here is code of method WizardDialog.updateDescriptionMessage: private void updateDescriptionMessage() { pageDescription = currentPage.getDescription(); setMessage(currentPage.getDescription()); } As you can see, it access currentPage.getDescription() two times, but value of this method is already in field pageDescription.
bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
* Creates new layout object.
         *
         * @param mw the margin width
         * @param mh the margin height
         * @param minW the minimum width
         * @param minH the minimum height
         */
        public PageContainerFillLayout(int mw, int mh, int minW, int minH) {
            marginWidth = mw;
            marginHeight = mh;
            minimumWidth = minW;
            minimumHeight = minH;
        }
        /* (non-Javadoc)
         * Method declared on Layout.
         */
        public Point computeSize(Composite composite, int wHint, int hHint,
                boolean force) {
            if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) {
				return new Point(wHint, hHint);
			}
            Point result = null;
            Control[] children = composite.getChildren();
            if (children.length > 0) {
                result = new Point(0, 0);
                for (int i = 0; i < children.length; i++) {
                    Point cp = children[i].computeSize(wHint, hHint, force);
                    result.x = Math.max(result.x, cp.x);
                    result.y = Math.max(result.y, cp.y);
                }