[ardoJSON] Use of Collections Generic Dictionary is not thread safe
Forge component by Ricardo Silva
Published on 24 Oct 2018
Application Type
Traditional Web, Mobile, Reactive, Service

Hello Team.

In a Customer we've started to experience 100% of cpu utilization and errors like the following:

After doing some research we were able to conclude that the high cpu is related with the way the json2recordList uses the Dictionary from Generic Collections. 

One of the possible solutions, and the easiest (but with a decrease in performance), is to declare the Json2RecordList method as Synchronized.

We've tried that and now the cpu utilization is always below 35%. 

Please tell me what you think about this and how open are you to upload a new version with this synchronized Json2RecordList or other thread safe solution.

I'm also sending our version of ardo json.

Thank you,

Ricardo Costa


Rank: #151

Good morning.

Meanwhile we've changed the usage of the Dictionary by the usage of the Concurrent Dictionary.

This solves the issue for the not synchronized method but is still cpu hungry.

The synchronized version is cpu friendly but with an impact on performance in our scenario of 88%.

In attachment the new version with the use of the concurrent dictionary.

Thank you,

Ricardo Costa