Click here to Skip to main content
15,909,199 members
Home / Discussions / C#
   

C#

 
QuestionC# LINQ JOIN: Getting out of memory exception Pin
Mou_kol5-Jul-19 10:03
Mou_kol5-Jul-19 10:03 
I am joining two list<t> type and each list has more than 800000 records.
may be this huge records causing this issue. my pc is 64 bit and 8GB RAM. i have windows 7 OS installed.
C#
var QCViewAllHistValue1 = (from frmlst in cfList
   join viewalllst in QCViewAllBrokerList1
   on new
   {
       val = String.IsNullOrEmpty(frmlst.Section) ? "" : frmlst.Section.Trim().ToUpper(),
       val1 = String.IsNullOrEmpty(frmlst.xFundCode) ? "" : frmlst.xFundCode.Trim().ToUpper(),
       val2 = String.IsNullOrEmpty(frmlst.Period) ? "" : frmlst.Period.Replace("A", "").Replace("E", "").Trim().ToUpper(),
       val3 = String.IsNullOrEmpty(frmlst.Broker) ? "" : frmlst.Broker.Trim().ToUpper()
   }
   equals new
   {
       val = String.IsNullOrEmpty(viewalllst.ViewAllSection) ? "" : viewalllst.ViewAllSection.Trim().ToUpper(),
       val1 = String.IsNullOrEmpty(viewalllst.xFundCode) ? "" : viewalllst.xFundCode.Trim().ToUpper(),
       val2 = String.IsNullOrEmpty(viewalllst.ViewAllPeriod) ? "" : viewalllst.ViewAllPeriod.Replace("A", "").Replace("E", "").Trim().ToUpper(),
       val3 = String.IsNullOrEmpty(viewalllst.ViewAllBroker) ? "" : viewalllst.ViewAllBroker.Trim().ToUpper()
   }

   select new QCHelper()
   {
       Value = viewalllst == null ? string.Empty : (viewalllst.Value == null ? string.Empty : viewalllst.Value),
   }).ToList<QCHelper>();


cfList & QCViewAllBrokerList1 these are two List<t> type. i am joining these two list and getting out of memory exception

i follow these two below links but there suggestion does not work for me.

https://stackoverflow.com/a/17322112/10839668

https://stackoverflow.com/a/53424048/10839668

please guide me how could i get rid of out of memory exception. thanks
AnswerRe: C# LINQ JOIN: Getting out of memory exception Pin
Mycroft Holmes5-Jul-19 13:28
professionalMycroft Holmes5-Jul-19 13:28 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Mou_kol8-Jul-19 5:53
Mou_kol8-Jul-19 5:53 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Dave Kreskowiak8-Jul-19 6:27
mveDave Kreskowiak8-Jul-19 6:27 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Eddy Vluggen8-Jul-19 8:22
professionalEddy Vluggen8-Jul-19 8:22 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Gerry Schmitz8-Jul-19 10:50
mveGerry Schmitz8-Jul-19 10:50 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Mycroft Holmes8-Jul-19 11:31
professionalMycroft Holmes8-Jul-19 11:31 
AnswerRe: C# LINQ JOIN: Getting out of memory exception Pin
Dave Kreskowiak5-Jul-19 18:55
mveDave Kreskowiak5-Jul-19 18:55 
AnswerRe: C# LINQ JOIN: Getting out of memory exception Pin
lmoelleb9-Jul-19 22:42
lmoelleb9-Jul-19 22:42 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Mou_kol14-Jul-19 0:34
Mou_kol14-Jul-19 0:34 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
lmoelleb14-Jul-19 10:41
lmoelleb14-Jul-19 10:41 
QuestionMouse delta Pin
MatrixRatrix4-Jul-19 0:14
MatrixRatrix4-Jul-19 0:14 
AnswerRe: Mouse delta Pin
BillWoodruff4-Jul-19 2:19
professionalBillWoodruff4-Jul-19 2:19 
QuestionWPF MVVM Entity Framework(using code First Approach) Pin
Member 145206353-Jul-19 23:21
Member 145206353-Jul-19 23:21 
AnswerRe: WPF MVVM Entity Framework(using code First Approach) Pin
F-ES Sitecore3-Jul-19 23:28
professionalF-ES Sitecore3-Jul-19 23:28 
GeneralRe: WPF MVVM Entity Framework(using code First Approach) Pin
Member 145206354-Jul-19 2:48
Member 145206354-Jul-19 2:48 
GeneralRe: WPF MVVM Entity Framework(using code First Approach) Pin
Gerry Schmitz4-Jul-19 7:36
mveGerry Schmitz4-Jul-19 7:36 
GeneralRe: WPF MVVM Entity Framework(using code First Approach) Pin
Mycroft Holmes4-Jul-19 13:01
professionalMycroft Holmes4-Jul-19 13:01 
AnswerRe: WPF MVVM Entity Framework(using code First Approach) Pin
BillWoodruff4-Jul-19 2:22
professionalBillWoodruff4-Jul-19 2:22 
Questionindex was out of bound of the array Pin
Derbz3-Jul-19 16:50
Derbz3-Jul-19 16:50 
AnswerRe: index was out of bound of the array Pin
phil.o3-Jul-19 17:26
professionalphil.o3-Jul-19 17:26 
GeneralRe: index was out of bound of the array Pin
lmoelleb3-Jul-19 22:36
lmoelleb3-Jul-19 22:36 
AnswerRe: index was out of bound of the array Pin
OriginalGriff3-Jul-19 19:49
mveOriginalGriff3-Jul-19 19:49 
AnswerRe: index was out of bound of the array Pin
bVagadishnu5-Jul-19 7:03
bVagadishnu5-Jul-19 7:03 
QuestionTrying to use VS2017 C# and Excel2007. I need help understanding the error being reported Pin
Greg Gonzales2-Jul-19 19:15
Greg Gonzales2-Jul-19 19:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.