mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 352301: [performance] Intern strings used for creation of
ICLanguageSettingsEntry objects
This commit is contained in:
parent
72b6075733
commit
114952f64a
2 changed files with 5 additions and 2 deletions
|
@ -11,6 +11,7 @@
|
||||||
package org.eclipse.cdt.core.settings.model;
|
package org.eclipse.cdt.core.settings.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer;
|
import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer;
|
||||||
|
import org.eclipse.cdt.internal.core.SafeStringInterner;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
||||||
String fName;
|
String fName;
|
||||||
|
|
||||||
ACSettingEntry(String name, int flags){
|
ACSettingEntry(String name, int flags){
|
||||||
fName = name;
|
fName = SafeStringInterner.safeIntern(name);
|
||||||
fFlags = flags;
|
fFlags = flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.settings.model;
|
package org.eclipse.cdt.core.settings.model;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.core.SafeStringInterner;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
||||||
|
@ -17,7 +19,7 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
||||||
|
|
||||||
public CMacroEntry(String name, String value, int flags) {
|
public CMacroEntry(String name, String value, int flags) {
|
||||||
super(name, flags);
|
super(name, flags);
|
||||||
fValue = value;
|
fValue = SafeStringInterner.safeIntern(value);
|
||||||
if(fValue == null)
|
if(fValue == null)
|
||||||
fValue = ""; //$NON-NLS-1$
|
fValue = ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue