Skip to content

Commit 1a2bb5d

Browse files
committed
Reconsider initial collection sizes
and remove commented code
1 parent 70d3ab4 commit 1a2bb5d

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

Orm/Xtensive.Orm/Orm/Upgrade/Internals/HintGenerator.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -632,20 +632,6 @@ private void UpdateAffectedColumns(RemoveFieldHint hint)
632632
storedField = result ?? throw FieldNotFound(typeName, hint.Field);
633633
fields = storedField.Fields;
634634
}
635-
636-
//var path = hint.Field.Split('.');
637-
//var fields = storedType.AllFields;
638-
//var fieldName = string.Empty;
639-
//for (var i = 0; i < path.Length; i++) {
640-
// fieldName += string.IsNullOrEmpty(fieldName) ? path[i] : "." + path[i];
641-
// var parameter = fieldName;
642-
// storedField = fields.SingleOrDefault(field => field.Name.Equals(parameter, StringComparison.Ordinal));
643-
// if (storedField == null) {
644-
// throw FieldNotFound(typeName, hint.Field);
645-
// }
646-
647-
// fields = storedField.Fields;
648-
//}
649635
}
650636
else {
651637
storedField = storedType.AllFields
@@ -788,7 +774,7 @@ from type in extractedNonConnectorTypes
788774
where type.IsEntity && (!type.IsAbstract) && (!type.IsGeneric) && (!type.IsInterface)
789775
where IsRemoved(type)
790776
select type
791-
).ToList(Math.Max(extractedNonConnectorTypes.Count / 4, 8));
777+
).ToList(Math.Max(extractedNonConnectorTypes.Count / 10, 8));
792778

793779
bool IsRemoved(StoredTypeInfo type)
794780
{
@@ -803,7 +789,7 @@ from type in extractedNonConnectorTypes
803789
where type.IsEntity && (!type.IsAbstract) && (!type.IsGeneric) && (!type.IsInterface)
804790
where IsMovedToAnotherHierarchy(type)
805791
select type
806-
).ToList(Math.Max(extractedNonConnectorTypes.Count / 4, 8));
792+
).ToList(Math.Max(extractedNonConnectorTypes.Count / 10, 8));
807793

808794
bool IsMovedToAnotherHierarchy(StoredTypeInfo oldType)
809795
{

0 commit comments

Comments
 (0)