1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 331882 - Unnecessary calls to getProjectDescription(IProject, true) are very expensive

This commit is contained in:
James Blackburn 2011-02-13 16:29:06 +00:00
parent ec126ace3f
commit 7cf13bb21c
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* Copyright (c) 2000, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -11,6 +11,7 @@
* IBM Corporation
* Anton Leherbauer (Wind River Systems)
* Warren Paul (Nokia) - Bug 218266
* James Blackburn (Broadcom Corp.)
*******************************************************************************/
package org.eclipse.cdt.internal.core.model;
@ -704,7 +705,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
ICProject cProject = getCProject();
IProject project= cProject.getProject();
ICProjectDescription description = CoreModel.getDefault().getProjectDescription(project, true);
ICProjectDescription description = CoreModel.getDefault().getProjectDescription(project, false);
ICConfigurationDescription configuration;
if (description == null) {

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* Copyright (c) 2000, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -8,6 +8,7 @@
* Contributors:
* QNX Software Systems - Initial API and implementation
* IBM Corporation
* James Blackburn (Broadcom Corp.)
*******************************************************************************/
package org.eclipse.cdt.core.resources;
@ -166,7 +167,7 @@ public abstract class ACBuilder extends IncrementalProjectBuilder implements IMa
@SuppressWarnings("nls")
private String cfgIdToNames(String strIds) {
IProject project = getProject();
ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(project);
ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(project, false);
if (prjDesc==null)
return strIds;