Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
AnswerRe: Fetching data from multiple mailboxes Pin
F-ES Sitecore7-Jun-17 22:47
professionalF-ES Sitecore7-Jun-17 22:47 
GeneralRe: Fetching data from multiple mailboxes Pin
Member 113461538-Jun-17 3:52
Member 113461538-Jun-17 3:52 
QuestionMissing data on Windows App form C# Pin
Member 131317266-Jun-17 23:33
Member 131317266-Jun-17 23:33 
AnswerRe: Missing data on Windows App form C# Pin
Jochen Arndt7-Jun-17 1:46
professionalJochen Arndt7-Jun-17 1:46 
GeneralRe: Missing data on Windows App form C# Pin
Member 131317267-Jun-17 2:47
Member 131317267-Jun-17 2:47 
GeneralRe: Missing data on Windows App form C# Pin
Gerry Schmitz7-Jun-17 3:16
mveGerry Schmitz7-Jun-17 3:16 
GeneralRe: Missing data on Windows App form C# Pin
Jochen Arndt7-Jun-17 3:26
professionalJochen Arndt7-Jun-17 3:26 
AnswerRe: Missing data on Windows App form C# Pin
Luc Pattyn8-Jun-17 13:44
sitebuilderLuc Pattyn8-Jun-17 13:44 
Hi,

your job is quite a challenge: with loads of data incoming at high rate and no way to stop the producer, the consumer (i.e. your PC program) needs to be designed and coded carefully and economically to obtain an acceptable probability of it keeping up with the producer under normal circumstances.

1. I do agree with what others said about using threads, not timers.

2. I do not like your approach of turning all data into strings, such conversion is time consuming and unnecessary, the one positive thing about it is it is easy and quite readable. If incoming data is binary, you should keep it binary at all times IMO. And your file should be binary too, unless there are forcing reasons against that.

3. Moreover, your code seems to be wasting huge amounts of computer cycles; there are dozens of calls to ByteArrayToHexString(buffer) all performing the same expensive job; and then a lot of them only are interested in a small part of the result, e.g. ByteArrayToHexString(buffer).Substring(16, 8); so why convert everything?
If you insist on having a conversion, either perform it once and store the result, or only convert the part you're interested in (i.e. pass startIndex and Length to the conversion method).

4. As you are basically performing two jobs (display and storage) and missing 30% of the data, it must be hard to figure out exactly where it goes wrong when it does. So I would suggest you concentrate on one job until that works perfectly; then do the other job, and finally combine them.



I hope this helps; I do realize my suggestions may imply a lot of work, and the need for a lot more code.
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Missing data on Windows App form C# Pin
Member 1313172611-Jun-17 20:41
Member 1313172611-Jun-17 20:41 
GeneralRe: Missing data on Windows App form C# Pin
Luc Pattyn12-Jun-17 6:15
sitebuilderLuc Pattyn12-Jun-17 6:15 
GeneralRe: Missing data on Windows App form C# Pin
Member 1313172612-Jun-17 20:39
Member 1313172612-Jun-17 20:39 
GeneralRe: Missing data on Windows App form C# Pin
Luc Pattyn12-Jun-17 23:42
sitebuilderLuc Pattyn12-Jun-17 23:42 
QuestionJson parser error when converting iphone images from bytes to base64 string in a MVC JsonResult Pin
jkirkerx6-Jun-17 10:22
professionaljkirkerx6-Jun-17 10:22 
AnswerRe: Json parser error when converting iphone images from bytes to base64 string in a MVC JsonResult [solved] Pin
jkirkerx6-Jun-17 12:49
professionaljkirkerx6-Jun-17 12:49 
SuggestionRe: Json parser error when converting iphone images from bytes to base64 string in a MVC JsonResult [solved] Pin
Richard Deeming7-Jun-17 0:57
mveRichard Deeming7-Jun-17 0:57 
GeneralRe: Json parser error when converting iphone images from bytes to base64 string in a MVC JsonResult [solved] Pin
jkirkerx7-Jun-17 6:33
professionaljkirkerx7-Jun-17 6:33 
QuestionCreate a chart in PowerPoint using C#. Pin
Member 126813284-Jun-17 22:30
Member 126813284-Jun-17 22:30 
AnswerRe: Create a chart in PowerPoint using C#. Pin
OriginalGriff4-Jun-17 22:43
mveOriginalGriff4-Jun-17 22:43 
Questioncustom controls not binding wpf Pin
Member 112967764-Jun-17 7:52
Member 112967764-Jun-17 7:52 
AnswerRe: custom controls not binding wpf Pin
Gerry Schmitz5-Jun-17 5:36
mveGerry Schmitz5-Jun-17 5:36 
GeneralRe: custom controls not binding wpf Pin
Member 112967765-Jun-17 18:30
Member 112967765-Jun-17 18:30 
QuestionConfigure Remote Machine's IP in C# Service At Install Time Pin
Django_Untaken3-Jun-17 22:58
Django_Untaken3-Jun-17 22:58 
AnswerRe: Configure Remote Machine's IP in C# Service At Install Time Pin
Eddy Vluggen4-Jun-17 2:55
professionalEddy Vluggen4-Jun-17 2:55 
AnswerRe: Configure Remote Machine's IP in C# Service At Install Time Pin
Gerry Schmitz4-Jun-17 4:45
mveGerry Schmitz4-Jun-17 4:45 
QuestionReport cant be display on report viewer page in c#.net windows form Pin
Member 132383512-Jun-17 22:31
Member 132383512-Jun-17 22:31 

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.