Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# how to Temporary pause button click event until mousedoubleclick on new form-listbox shown? Pin
BillWoodruff20-Apr-18 3:59
professionalBillWoodruff20-Apr-18 3:59 
Questionplease hellp me how to write a code in c# which is send warning message before specific time thanks Pin
ahmedoze18-Apr-18 16:09
ahmedoze18-Apr-18 16:09 
AnswerRe: please hellp me how to write a code in c# which is send warning message before specific time thanks Pin
OriginalGriff18-Apr-18 19:50
mveOriginalGriff18-Apr-18 19:50 
QuestionRe: please hellp me how to write a code in c# which is send warning message before specific time thanks Pin
Eddy Vluggen18-Apr-18 22:50
professionalEddy Vluggen18-Apr-18 22:50 
AnswerRe: please hellp me how to write a code in c# which is send warning message before specific time thanks Pin
Richard MacCutchan19-Apr-18 0:57
mveRichard MacCutchan19-Apr-18 0:57 
AnswerRe: please hellp me how to write a code in c# which is send warning message before specific time thanks Pin
Pete O'Hanlon18-Apr-18 23:16
mvePete O'Hanlon18-Apr-18 23:16 
AnswerRe: please hellp me how to write a code in c# which is send warning message before specific time thanks Pin
Kandula Santosh21-Apr-18 8:15
Kandula Santosh21-Apr-18 8:15 
QuestionProcess.start is slow compared to Powershell Start-Process Pin
Neal Conrardy18-Apr-18 8:47
Neal Conrardy18-Apr-18 8:47 
I wrote a command line program to create a process and run a simulation in the background. This worked fine for many years but IT pushed something to our computers and it no longer works efficiently. I use this program to start 200+ simulation runs and as they queued up, they would use 100% loading all my workstation 40 cores until they finished in about 15 seconds. I am not sure what IT pushed to our computers but now I can only get about a 30% usage of my cores and takes 45 seconds to complete. The program only gets about 12 or so simulations running simultaneously. So I tried using Start-Process in powershell and low and behold, it would queue up enough simulations to run to load all 40 cores to 100%. Can anyone tell my how I can get the Process.start to use all of the processing power. IT does not know what has changed to cause the issue. It is a policy setting as IT did test a clean computer without the required policy settings and the Process.Start was able to load all of the cores.

Here is the code I used to start running a single process in C#.

C#
try
{
  Process process = new Process();

  if (optionHidden)
  {
    process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
  }

  process.StartInfo.FileName = application;

  process.StartInfo.Arguments = arguments;

  process.Start();

  if (optionWait)
  {
    process.WaitForExit();
  }
}

catch (Exception e)
{
  Console.WriteLine("Failed to launch {0} because of {1}", application, e.Message);
}


The application name is nStart and looks like this to start all of the simulation runs.

nStart /hidden nDOF.exe MM0000.ndof
nStart /hidden nDOF.exe MM0001.ndof
nStart /hidden nDOF.exe MM0002.ndof
nStart /hidden nDOF.exe MM0003.ndof
.
.
.

The powershell script looks like this.

Start-Process .\nDOF.exe -ArgumentList 'MM0000.ndof'
Start-Process .\nDOF.exe -ArgumentList 'MM0001.ndof'
Start-Process .\nDOF.exe -ArgumentList 'MM0002.ndof'
Start-Process .\nDOF.exe -ArgumentList 'MM0003.ndof'
.
.
.
AnswerRe: Process.start is slow compared to Powershell Start-Process Pin
Dave Kreskowiak18-Apr-18 17:20
mveDave Kreskowiak18-Apr-18 17:20 
GeneralRe: Process.start is slow compared to Powershell Start-Process Pin
Neal Conrardy19-Apr-18 5:15
Neal Conrardy19-Apr-18 5:15 
AnswerRe: Process.start is slow compared to Powershell Start-Process Pin
Eddy Vluggen18-Apr-18 22:55
professionalEddy Vluggen18-Apr-18 22:55 
QuestionSend data toServer with two parameters Pin
Carmen_Mundi18-Apr-18 8:44
Carmen_Mundi18-Apr-18 8:44 
QuestionRe: Send data toServer with two parameters Pin
Richard MacCutchan18-Apr-18 21:55
mveRichard MacCutchan18-Apr-18 21:55 
AnswerRe: Send data toServer with two parameters Pin
Carmen_Mundi19-Apr-18 5:55
Carmen_Mundi19-Apr-18 5:55 
GeneralRe: Send data toServer with two parameters Pin
Richard MacCutchan19-Apr-18 6:13
mveRichard MacCutchan19-Apr-18 6:13 
GeneralRe: Send data toServer with two parameters Pin
Carmen_Mundi19-Apr-18 7:37
Carmen_Mundi19-Apr-18 7:37 
GeneralRe: Send data toServer with two parameters Pin
Richard MacCutchan19-Apr-18 21:53
mveRichard MacCutchan19-Apr-18 21:53 
QuestionReading a specific portion of a text file Pin
Member 1377871518-Apr-18 4:42
Member 1377871518-Apr-18 4:42 
AnswerRe: Reading a specific portion of a text file Pin
OriginalGriff18-Apr-18 4:59
mveOriginalGriff18-Apr-18 4:59 
GeneralRe: Reading a specific portion of a text file Pin
Member 1377871518-Apr-18 7:34
Member 1377871518-Apr-18 7:34 
GeneralRe: Reading a specific portion of a text file Pin
OriginalGriff18-Apr-18 8:16
mveOriginalGriff18-Apr-18 8:16 
GeneralRe: Reading a specific portion of a text file Pin
Member 1377871518-Apr-18 11:29
Member 1377871518-Apr-18 11:29 
AnswerRe: Reading a specific portion of a text file Pin
Gerry Schmitz18-Apr-18 5:54
mveGerry Schmitz18-Apr-18 5:54 
QuestionManagementScope, did it get deprecated or something? Pin
Robert Oujesky18-Apr-18 4:38
Robert Oujesky18-Apr-18 4:38 
AnswerRe: ManagementScope, did it get deprecated or something? Pin
OriginalGriff18-Apr-18 5:03
mveOriginalGriff18-Apr-18 5:03 

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.