Bug 18673

Summary: Quadratic Time for Enumerable.GroupBy
Product: [Mono] Class Libraries Reporter: Aggelos Biboudis <biboudis>
Component: System.CoreAssignee: Marek Safar <masafa>
Severity: normal CC: biboudis, masafa, mono-bugs+mono, nick.palladinos
Priority: ---    
Version: master   
Target Milestone: Untriaged   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:

Description Aggelos Biboudis 2014-03-31 14:18:52 UTC
This snippet seems to run in quadratic time (forever). 

Enumerable.Range(1,10000000).GroupBy(x => x).ToArray();

This doesn't happen in the parallel version.
Comment 1 Aggelos Biboudis 2014-04-01 16:52:54 UTC
This seems to be the problem. The nested iterations in https://github.com/mono/mono/blob/master/mcs/class/System.Core/System.Linq/Enumerable.cs#L916
Comment 2 Marek Safar 2014-04-30 05:55:26 UTC
Fixed in master