When navigation property is populated Add method is called on RelatedEnd class in loop. Add method internally calls CheckIfNavigationPropertyContainsEntity on EntityCollection class - this method contains another loop iterating over all items in the navigation property. Filling navigation property this way has quadratic complexity because each added item is compared with all already added items.
It was reported second time on Stack Overflow as a performance issue:
http://stackoverflow.com/questions/7403149/entity-framework-performance-issue
http://stackoverflow.com/questions/12898790/codefirst-loading-1-parent-linked-to-25-000-children-is-slow
It was reported second time on Stack Overflow as a performance issue:
http://stackoverflow.com/questions/7403149/entity-framework-performance-issue
http://stackoverflow.com/questions/12898790/codefirst-loading-1-parent-linked-to-25-000-children-is-slow