Click here to Skip to main content
11,704,107 members (58,049 online)
   

C#

 
AnswerRe: C# Performance Issue Pin
Bernhard Hiller17-Aug-14 20:29
professionalBernhard Hiller17-Aug-14 20:29 
AnswerRe: C# Performance Issue Pin
Richard MacCutchan17-Aug-14 20:41
protectorRichard MacCutchan17-Aug-14 20:41 
GeneralRe: C# Performance Issue Pin
Mycroft Holmes17-Aug-14 20:59
professionalMycroft Holmes17-Aug-14 20:59 
GeneralRe: C# Performance Issue Pin
Richard MacCutchan17-Aug-14 21:34
protectorRichard MacCutchan17-Aug-14 21:34 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 4:46
memberSledgeHammer0118-Aug-14 4:46 
AnswerRe: C# Performance Issue Pin
Rob Philpott17-Aug-14 23:45
professionalRob Philpott17-Aug-14 23:45 
AnswerRe: C# Performance Issue Pin
Richard Deeming18-Aug-14 2:30
professionalRichard Deeming18-Aug-14 2:30 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 4:51
memberSledgeHammer0118-Aug-14 4:51 
I did switch to ConcurrentDictionary in one area of the code and it shaved some time off @ 1M x.

But it seems, and let me get your thoughts on this, that ConcurrentDictionary is only going to be appropriate in this scenario:

lock (dict)
{
   dict.TryGetValue(...);
}

I.e. an atomic operation and not something like:

lock (dict)
{
      if (!dict.TryGetValue(...))
      {
            DoSomeOtherStuff;
            DoAFewMoreThings;
            NewUpANewObject;
            dict.InsertNewObject();
      }
}

I.e. a non atomic operation. In the second case, switching to ConcurrentDictionary and not locking would be an issue because you'd have a race condition to insert the new item.
GeneralRe: C# Performance Issue Pin
Richard Deeming18-Aug-14 7:31
professionalRichard Deeming18-Aug-14 7:31 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 8:31
memberSledgeHammer0118-Aug-14 8:31 
AnswerRe: C# Performance Issue Pin
Pete O'Hanlon18-Aug-14 3:09
protectorPete O'Hanlon18-Aug-14 3:09 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 4:52
memberSledgeHammer0118-Aug-14 4:52 
GeneralRe: C# Performance Issue Pin
Pete O'Hanlon18-Aug-14 4:56
protectorPete O'Hanlon18-Aug-14 4:56 
AnswerRe: C# Performance Issue Pin
jschell18-Aug-14 11:51
memberjschell18-Aug-14 11:51 
QuestionC#/JS problematic iteration with table... Pin
OmegaExtern16-Aug-14 17:23
memberOmegaExtern16-Aug-14 17:23 
AnswerRe: C#/JS problematic iteration with table... Pin
Richard MacCutchan16-Aug-14 21:11
protectorRichard MacCutchan16-Aug-14 21:11 
QuestionC# Keybind for Autoclicker Pin
Member 1101699616-Aug-14 16:39
memberMember 1101699616-Aug-14 16:39 
AnswerRe: C# Keybind for Autoclicker Pin
Zain Ul Abidin16-Aug-14 19:49
memberZain Ul Abidin16-Aug-14 19:49 
AnswerRe: C# Keybind for Autoclicker Pin
OmegaExtern16-Aug-14 20:44
memberOmegaExtern16-Aug-14 20:44 
GeneralRe: C# Keybind for Autoclicker Pin
Member 1101699616-Aug-14 20:47
memberMember 1101699616-Aug-14 20:47 
GeneralRe: C# Keybind for Autoclicker Pin
OmegaExtern16-Aug-14 20:50
memberOmegaExtern16-Aug-14 20:50 
Questioncheck array value exists Pin
scottichrosaviakosmos16-Aug-14 3:11
memberscottichrosaviakosmos16-Aug-14 3:11 
AnswerRe: check array value exists Pin
jlopez78816-Aug-14 3:34
memberjlopez78816-Aug-14 3:34 
GeneralRe: check array value exists Pin
scottichrosaviakosmos16-Aug-14 4:03
memberscottichrosaviakosmos16-Aug-14 4:03 
AnswerRe: check array value exists Pin
OriginalGriff16-Aug-14 3:39
protectorOriginalGriff16-Aug-14 3:39 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 28 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid