Back to THashMap, which is less memory hungry than LinkedHashMap and ensure locality by sorting things. Please note, actual VirtualFile implementation does have an effective hashCode implementation

This commit is contained in:
Maxim Shafirov
2012-04-09 20:09:57 +04:00
parent 553a73f16a
commit 81ab895c34
3 changed files with 26 additions and 10 deletions
@@ -33,8 +33,6 @@ import gnu.trove.THashMap;
import org.jdom.Element;
import org.jetbrains.annotations.Nullable;
import java.util.Map;
/**
* @author anna
* Date: 20-Dec-2007
@@ -135,8 +133,7 @@ public class RefJavaManagerImpl extends RefJavaManager {
refPackage.accept(visitor);
}
}
final Map<PsiAnchor, RefElement> refTable = myRefManager.getRefTable();
for (RefElement refElement : refTable.values()) {
for (RefElement refElement : myRefManager.getSortedElements()) {
if (refElement instanceof RefClass) {
RefClass refClass = (RefClass)refElement;
RefMethod refDefaultConstructor = refClass.getDefaultConstructor();