linq contention time
-
segunda-feira, 24 de outubro de 2011 14:31I'm trying to write linq in a parallel context:Parallel.For(0, 4, op, Sub(iOppInfo, loopState)Dim r = (From a In listAJoin b In listBOn a.A_FieldA Equals b.B_FieldAJoin c In listC On b.B_FieldB Equals c.C_FieldBWhere (a.A_FieldD.Length < 5)Select a)Dim list As New List(Of ClassA)For Each e In rlist.Add(e)NextI run a profiling analyzing and found at blocked time at:-System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()--ConsoleApplication3.Module1._Lambda$__7(class VB$AnonymousType_0`2<class ConsoleApplication3.Module1/ClassA,class ConsoleApplication3.Module1/ClassB>,class ConsoleApplication3.Module1/ClassC)---JIT_NewFast(struct CORINFO_CLASS_STRUCT_ *)(listA,listB,listC won't be changed during the operation (you can consider it as readonly))Question: Is it normal? How can I make it not blocked?Making listA,listB,listC static?
Todas as Respostas
-
quinta-feira, 27 de outubro de 2011 18:28Moderador
Can you provide your project?
This forum is for discussing the tool's usage, instead of improve the performance and algorithm, so it would be off-topic in this forum, can I help you change the thread type to keep this thread here, or I need to move it to off-topic forum, if I have not misunderstood your question.
If there's any concern, please feel free to let me know.
Best wishes,
Mike [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
domingo, 30 de outubro de 2011 12:25ModeradorI am writing to check the status of the issue on your side.What about this problem now?Would you mind letting us know the result of the suggestions?
Mike Zhang[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


