Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
AnswerRe: the quesion about Timer:it is Started but does not run the funtion every minute? Pin
Michael Sync12-Aug-07 3:25
Michael Sync12-Aug-07 3:25 
QuestionEncryption Pin
Vipin.d11-Aug-07 20:28
Vipin.d11-Aug-07 20:28 
AnswerRe: Encryption Pin
Giorgi Dalakishvili11-Aug-07 23:17
mentorGiorgi Dalakishvili11-Aug-07 23:17 
GeneralRe: Encryption Pin
Vipin.d17-Aug-07 21:06
Vipin.d17-Aug-07 21:06 
QuestionSlow String Arrays Pin
Expert Coming11-Aug-07 19:55
Expert Coming11-Aug-07 19:55 
AnswerRe: Slow String Arrays Pin
Michael Sync12-Aug-07 3:39
Michael Sync12-Aug-07 3:39 
AnswerRe: Slow String Arrays Pin
DavidNohejl12-Aug-07 4:16
DavidNohejl12-Aug-07 4:16 
AnswerRe: Slow String Arrays Pin
Luc Pattyn12-Aug-07 4:26
sitebuilderLuc Pattyn12-Aug-07 4:26 
If things are slow the culprit is either regex or the database access (or both),
certainly not the ArrayList. One more possibility is you are exhausting memory
causing lots of disk accesses (I trust you would notice that).


Now 20 minutes for 100K strings is way too much, so maybe you wasted lots of time
everywhere. It may help to do the following:
- check for linear behavior: does doing half the job (half as many strings) take half
the time ? if not, something is deteriorating, maybe you selected a non-linear
algorithm somewhere, and maybe you created some memory leaks.
- get accurate time measurements on all the steps for one of the strings (but not
the very first one), so add log statements everywhere and look for the biggest
gap in time. A log statement could be:
if (stringCount==100) log("going to create regex");
and then you need to add the method to every class concerned:

public static void log(string s) {
    Console.WriteLine(DateTime.Now.ToString("hh:mm:ss.ff")+" "+s);
}


Smile | :)




Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


AnswerRe: Slow String Arrays Pin
Colin Angus Mackay12-Aug-07 4:29
Colin Angus Mackay12-Aug-07 4:29 
Questiontif image file to binary format using C# Pin
Parvai11-Aug-07 19:54
Parvai11-Aug-07 19:54 
AnswerRe: tif image file to binary format using C# Pin
Expert Coming11-Aug-07 19:56
Expert Coming11-Aug-07 19:56 
QuestionCreating .msi file for A windows Service Application Pin
boneyds11-Aug-07 19:10
boneyds11-Aug-07 19:10 
QuestionURGENT!!! Folder security code needed Pin
aravinda77711-Aug-07 18:26
aravinda77711-Aug-07 18:26 
AnswerRe: URGENT!!! Folder security code needed Pin
Expert Coming11-Aug-07 19:58
Expert Coming11-Aug-07 19:58 
QuestionAsk for Windows application implement communication between many clients and one server Pin
liucaihua11-Aug-07 17:09
liucaihua11-Aug-07 17:09 
AnswerRe: Ask for Windows application implement communication between many clients and one server Pin
Ravi Bhavnani11-Aug-07 19:40
professionalRavi Bhavnani11-Aug-07 19:40 
Questionproblem to use thread.Abort() method. Pin
hdv21211-Aug-07 15:01
hdv21211-Aug-07 15:01 
AnswerRe: problem to use thread.Abort() method. Pin
Leslie Sanford11-Aug-07 15:29
Leslie Sanford11-Aug-07 15:29 
AnswerRe: problem to use thread.Abort() method. Pin
S. Senthil Kumar11-Aug-07 15:33
S. Senthil Kumar11-Aug-07 15:33 
QuestionGraphically rich menus (like Microsoft Word) Pin
Muhammad Nauman Yousuf11-Aug-07 12:26
Muhammad Nauman Yousuf11-Aug-07 12:26 
AnswerRe: Graphically rich menus (like Microsoft Word) Pin
Paul Conrad11-Aug-07 16:02
professionalPaul Conrad11-Aug-07 16:02 
AnswerRe: Graphically rich menus (like Microsoft Word) Pin
ekynox12-Aug-07 13:30
ekynox12-Aug-07 13:30 
QuestionUsing Orca to modify a user interface dialog. Pin
steve_rm11-Aug-07 12:08
steve_rm11-Aug-07 12:08 
QuestionAccessing a single class instance from external assemblies Pin
thg97111-Aug-07 10:27
thg97111-Aug-07 10:27 
AnswerRe: Accessing a single class instance from external assemblies Pin
S. Senthil Kumar11-Aug-07 15:39
S. Senthil Kumar11-Aug-07 15:39 

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.