Click here to Skip to main content
15,881,381 members
Home / Discussions / C#
   

C#

 
AnswerRe: Data Entry application using strongly typed dataset Pin
Eddy Vluggen10-Apr-16 10:17
professionalEddy Vluggen10-Apr-16 10:17 
QuestionCalls a method c# Pin
Bougarra8-Apr-16 1:18
Bougarra8-Apr-16 1:18 
AnswerRe: Calls a method c# Pin
OriginalGriff8-Apr-16 1:30
mveOriginalGriff8-Apr-16 1:30 
AnswerRe: Calls a method c# Pin
Richard MacCutchan8-Apr-16 2:49
mveRichard MacCutchan8-Apr-16 2:49 
AnswerRe: Calls a method c# Pin
Rahul Hanumant Chavan8-Apr-16 21:31
professionalRahul Hanumant Chavan8-Apr-16 21:31 
QuestionSpeed up code Pin
GrooverFromHolland8-Apr-16 0:37
GrooverFromHolland8-Apr-16 0:37 
AnswerRe: Speed up code Pin
OriginalGriff8-Apr-16 1:12
mveOriginalGriff8-Apr-16 1:12 
AnswerRe: Speed up code PinPopular
Sascha Lefèvre8-Apr-16 1:20
professionalSascha Lefèvre8-Apr-16 1:20 
C#
for (int i = 0; i < length; i += 8) // length = 1176

-> 1176 / 8 = 147 loop executions

C#
SqlCeExtentions.ZakdataDatabase_Update(column, valueString, opdrString); // 87ms

-> 147 * 87ms = 12.8 seconds

C#
the code snippet below takes 16 seconds 

-> 12.8s * 100% / 16s = 80%

The database call makes up for 80% of the time spend for that code. You don't need to optimize the code that you've shown here, you need to optimize the database call. You probably should build a batch statement and use that to update the database only once after the loop is done.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

GeneralRe: Speed up code Pin
OriginalGriff8-Apr-16 1:34
mveOriginalGriff8-Apr-16 1:34 
GeneralRe: Speed up code Pin
GrooverFromHolland8-Apr-16 1:52
GrooverFromHolland8-Apr-16 1:52 
GeneralRe: Speed up code Pin
Sascha Lefèvre8-Apr-16 2:41
professionalSascha Lefèvre8-Apr-16 2:41 
GeneralRe: Speed up code Pin
Eddy Vluggen8-Apr-16 2:54
professionalEddy Vluggen8-Apr-16 2:54 
AnswerRe: Speed up code Pin
Gerry Schmitz8-Apr-16 7:24
mveGerry Schmitz8-Apr-16 7:24 
GeneralRe: Speed up code Pin
GrooverFromHolland18-Apr-16 23:59
GrooverFromHolland18-Apr-16 23:59 
GeneralRe: Speed up code Pin
Gerry Schmitz19-Apr-16 4:58
mveGerry Schmitz19-Apr-16 4:58 
AnswerRe: Speed up code Pin
Patrice T9-Apr-16 0:01
mvePatrice T9-Apr-16 0:01 
GeneralRe: Speed up code Pin
GrooverFromHolland9-Apr-16 1:56
GrooverFromHolland9-Apr-16 1:56 
GeneralRe: Speed up code Pin
Patrice T9-Apr-16 5:09
mvePatrice T9-Apr-16 5:09 
Question.NET Remoting connection timing out after many invocations Pin
RichardGrimmer7-Apr-16 20:30
RichardGrimmer7-Apr-16 20:30 
AnswerRe: .NET Remoting connection timing out after many invocations Pin
Richard Andrew x648-Apr-16 3:42
professionalRichard Andrew x648-Apr-16 3:42 
AnswerRe: .NET Remoting connection timing out after many invocations Pin
Dikshitar V.9-Apr-16 10:23
Dikshitar V.9-Apr-16 10:23 
QuestionLocal Service to monitor a folder on desktop Pin
Blubbo7-Apr-16 9:40
Blubbo7-Apr-16 9:40 
AnswerRe: Local Service to monitor a folder on desktop Pin
Richard Deeming7-Apr-16 10:25
mveRichard Deeming7-Apr-16 10:25 
GeneralRe: Local Service to monitor a folder on desktop Pin
Blubbo8-Apr-16 1:26
Blubbo8-Apr-16 1:26 
GeneralRe: Local Service to monitor a folder on desktop Pin
Richard Deeming8-Apr-16 1:46
mveRichard Deeming8-Apr-16 1:46 

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.