proof of how slow resharper's intellisense is

I've taken a short video with Jing, demonstrating how slow the intellisense frequently is:

http://screencast.com/t/mwwjaWhIR

Having to sit there and wait for the popup to appear largely defeats the purpose of autocompletion seeing as in the time I'm waiting I could have just typed the whole word myself. I experienced this back in ReSharper 3 and in the 4.0 beta as well. Currently using 4.5 after having not used ReSharper for about a year.

Thoughts?

4 comments

Hello Nathan,

What is type of "data" variable? We'd like to know how many members it contains,
and what is inheritance chain of the type. Thanks.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


NR> I've taken a short video with Jing, demonstrating how slow the
NR> intellisense frequently is:
NR>
NR> http://screencast.com/t/mwwjaWhIR
NR>
NR> Having to sit there and wait for the popup to appear largely defeats
NR> the purpose of autocompletion seeing as in the time I'm waiting I
NR> could have just typed the whole word myself. I experienced this back
NR> in ReSharper 3 and in the 4.0 beta as well. Currently using 4.5
NR> after having not used ReSharper for about a year.
NR>
NR> Thoughts?
NR>
NR> ---
NR> Original message URL:
NR> http://www.jetbrains.net/devnet/message/5237620#5237620


0

Code below. It'll be formatted better obviously if you post it into visual studio somewhere. the bit in the video is down in the last block of code i've pasted, which in total consists of one giant LINQ statement and a class which is fed by the LINQ statement.


public class DataDefinitionInfo
{
public class Details
{
public long ID { get; set; }
public string Name { get; set; }
public bool Selected { get; set; }
}

public List<Details> Dealers { get; set; }
public List<Details> Networks { get; set; }
public List<Details> Distributors { get; set; }
public List<Details> Handsets { get; set; }
public List<Details> Tariffs { get; set; }
public List<Details> AddOns { get; set; }
public List<Details> Accessories { get; set; }
public List<Details> Gifts { get; set; }

public bool DealersSelected { get { return Dealers.Where(h => h.Selected).Count() > 0; } }
public bool NetworksSelected { get { return Networks.Where(h => h.Selected).Count() > 0; } }
public bool DistributorsSelected { get { return Distributors.Where(h => h.Selected).Count() > 0; } }
public bool HandsetsSelected { get { return Handsets.Where(h => h.Selected).Count() > 0; } }
public bool TariffsSelected { get { return Tariffs.Where(h => h.Selected).Count() > 0; } }
public bool AddOnsSelected { get { return AddOns.Where(h => h.Selected).Count() > 0; } }
public bool AccessoriesSelected { get { return Accessories.Where(h => h.Selected).Count() > 0; } }
public bool GiftsSelected { get { return Gifts.Where(h => h.Selected).Count() > 0; } }
}

private DataDefinitionInfo LoadDataDefinitionSpecifics(long? id, bool updateFromForm)
{
// the following reference to users is a dodgy hack to force the linq query to return multiple result sets in one operation...
var data = (from tmp in DataContext.Users
select new DataDefinitionInfo
{
Dealers = (from k in DataContext.Dealers
   where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionDealers
where x.DataDefinitionID == id && x.DealerID == k.ID
select x).Count() > 0)
   select new DataDefinitionInfo.Details
   {
   ID = k.ID,
   Name = k.Name,
   Selected = (from x in k.DataDefinitionDealers
   where x.DataDefinitionID == id && x.DealerID == k.ID
   select x).Count() > 0
   }).ToList(),

Networks = (from k in DataContext.Networks
where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionNetworks
where x.DataDefinitionID == id && x.NetworkID == k.ID
select x).Count() > 0)
select new DataDefinitionInfo.Details
{
ID = k.ID,
Name = k.Name,
Selected = (from x in k.DataDefinitionNetworks
where x.DataDefinitionID == id && x.NetworkID == k.ID
select x).Count() > 0
}).ToList(),

Distributors = (from k in DataContext.Distributors
where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionDistributors
where x.DataDefinitionID == id && x.DistributorID == k.ID
select x).Count() > 0)
select new DataDefinitionInfo.Details
{
ID = k.ID,
Name = k.Name,
Selected = (from x in k.DataDefinitionDistributors
where x.DataDefinitionID == id && x.DistributorID == k.ID
select x).Count() > 0
}).ToList(),

Handsets = (from k in DataContext.Handsets
where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionHandsets
where x.DataDefinitionID == id && x.HandsetID == k.ID
select x).Count() > 0)
select new DataDefinitionInfo.Details
{
ID = k.ID,
Name = k.Name,
Selected = (from x in k.DataDefinitionHandsets
where x.DataDefinitionID == id && x.HandsetID == k.ID
select x).Count() > 0
}).ToList(),

Tariffs = (from k in DataContext.Tariffs
   where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionTariffs
where x.DataDefinitionID == id && x.TariffID == k.ID
select x).Count() > 0)
   select new DataDefinitionInfo.Details
   {
   ID = k.ID,
   Name = k.Name,
   Selected = (from x in k.DataDefinitionTariffs
   where x.DataDefinitionID == id && x.TariffID == k.ID
   select x).Count() > 0
   }).ToList(),

AddOns = (from k in DataContext.AddOns
  where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionAddOns
   where x.DataDefinitionID == id && x.AddOnID == k.ID
   select x).Count() > 0)
  select new DataDefinitionInfo.Details
  {
  ID = k.ID,
  Name = k.Name,
  Selected = (from x in k.DataDefinitionAddOns
  where x.DataDefinitionID == id && x.AddOnID == k.ID
  select x).Count() > 0
  }).ToList(),

Accessories = (from k in DataContext.Accessories
   where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionAccessories
where x.DataDefinitionID == id && x.AccessoryID == k.ID
select x).Count() > 0)
   select new DataDefinitionInfo.Details
   {
   ID = k.ID,
   Name = k.Name,
   Selected = (from x in k.DataDefinitionAccessories
   where x.DataDefinitionID == id && x.AccessoryID == k.ID
   select x).Count() > 0
   }).ToList(),

Gifts = (from k in DataContext.Gifts
where !k.Deleted && (!k.Archived || (from x in k.DataDefinitionGifts
  where x.DataDefinitionID == id && x.GiftID == k.ID
  select x).Count() > 0)
select new DataDefinitionInfo.Details
{
ID = k.ID,
Name = k.Name,
Selected = (from x in k.DataDefinitionGifts
where x.DataDefinitionID == id && x.GiftID == k.ID
select x).Count() > 0
}).ToList(),
}).First();

if (updateFromForm)
{
foreach (var details in data.Dealers)
details.Selected = Request.Form["Dealer_" + details.ID].Contains("true");
foreach (var details in data.Networks)
details.Selected = Request.Form["Network_" + details.ID].Contains("true");
foreach (var details in data.Distributors)
details.Selected = Request.Form["Distributor_" + details.ID].Contains("true");
foreach (var details in data.Handsets)
details.Selected = Request.Form["Handset_" + details.ID].Contains("true");
foreach (var details in data.Tariffs)
details.Selected = Request.Form["Tariff_" + details.ID].Contains("true");
foreach (var details in data.AddOns)
details.Selected = Request.Form["AddOn_" + details.ID].Contains("true");
foreach (var details in data.Accessories)
details.Selected = Request.Form["Accessory_" + details.ID].Contains("true");
foreach (var details in data.Gifts)
details.Selected = Request.Form["Gift_" + details.ID].Contains("true");
}
return data;
}

0

Thank you very much for the code sample, we will investigate it and get back to you.

0

Hello Nathan,

I've tried to reproduce your case. And I've failed. May be it's smth wrong with repro example? Please see attached file, could you reproduce the problem on it or I've missed smth?

Anyway the problem looks very bad. Hope we will reproduce it with your help and fix then. Thanks for reporting it!

One more question: what is your hardware and software configuration?



Attachment(s):
CompletionInLinq.rar
0

Please sign in to leave a comment.