Click here to Skip to main content
16,004,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: problem related to tab control Pin
Luc Pattyn8-Apr-09 16:49
sitebuilderLuc Pattyn8-Apr-09 16:49 
QuestionA Return to VB Email Pin
Dalek Dave8-Apr-09 13:20
professionalDalek Dave8-Apr-09 13:20 
AnswerRe: A Return to VB Email Pin
Dave Kreskowiak8-Apr-09 13:26
mveDave Kreskowiak8-Apr-09 13:26 
GeneralRe: A Return to VB Email Pin
Dalek Dave8-Apr-09 13:50
professionalDalek Dave8-Apr-09 13:50 
GeneralRe: A Return to VB Email Pin
Christian Graus8-Apr-09 14:31
protectorChristian Graus8-Apr-09 14:31 
GeneralRe: A Return to VB Email Pin
Dave Kreskowiak8-Apr-09 17:28
mveDave Kreskowiak8-Apr-09 17:28 
GeneralRe: A Return to VB Email Pin
Dalek Dave8-Apr-09 21:27
professionalDalek Dave8-Apr-09 21:27 
QuestionWhy is this loop intermittently slow? Pin
Steve Faust8-Apr-09 11:56
Steve Faust8-Apr-09 11:56 
I've got a problem that I can't figure out. I have the below section of code running over and over again (probably 10k-15k times). The variables are as follows:

Wd = a single word passed to the function for checking
SkipList = a list of string patterns to use 'like' with (i.e. "##.#[a-z]") - currently 570 strings.
ct = a counter I just put in to make sure it was running through the whole list (it is).

If SkipList.Contains(Wd) Then
     Return Nothing
 Else
     For Each s As String In SkipList
         ct += 1
         If Wd.ToLower Like s Then
             Return Nothing
             Exit Function
         End If
     Next
 End If


The code runs, but at seemingly random intervals it runs slow. I put some code in my function to find out where the overall application was running slow and narrowed it down to this block. The strange thing is that it runs through the whole SkipList in 0 milliseconds most of the time, but here and there it comes up with 15.627 milliseconds. The really strange thing is that it's not in the same place every time. I can use the same function, the same list of words (in the same order), and the same SkipList, and the 15.627ms comes up on different words every time I run it, and it's always exactly 15.627ms.

Can anyone tell me what's going on? Or hints as to what else I can do to speed this up?
AnswerRe: Why is this loop intermittently slow? Pin
Luc Pattyn8-Apr-09 12:40
sitebuilderLuc Pattyn8-Apr-09 12:40 
AnswerRe: Why is this loop intermittently slow? Pin
Dave Kreskowiak8-Apr-09 12:41
mveDave Kreskowiak8-Apr-09 12:41 
GeneralRe: Why is this loop intermittently slow? [modified] Pin
Steve Faust8-Apr-09 12:45
Steve Faust8-Apr-09 12:45 
QuestionSend email in VB Pin
Dalek Dave8-Apr-09 3:50
professionalDalek Dave8-Apr-09 3:50 
AnswerRe: Send email in VB Pin
Dave Kreskowiak8-Apr-09 4:25
mveDave Kreskowiak8-Apr-09 4:25 
AnswerRe: Send email in VB Pin
Jay Royall8-Apr-09 4:27
Jay Royall8-Apr-09 4:27 
QuestionMotion detection VB6 Pin
obi_wan8-Apr-09 1:56
obi_wan8-Apr-09 1:56 
AnswerRe: Motion detection VB6 Pin
EliottA8-Apr-09 3:17
EliottA8-Apr-09 3:17 
AnswerRe: Motion detection VB6 Pin
Dave Kreskowiak8-Apr-09 3:32
mveDave Kreskowiak8-Apr-09 3:32 
Questionhow to add url to vb6.0 desktop application in button click Pin
premprakashbhati8-Apr-09 0:12
premprakashbhati8-Apr-09 0:12 
AnswerRe: how to ask a proper question Pin
Ashfield8-Apr-09 1:30
Ashfield8-Apr-09 1:30 
GeneralRe: how to ask a proper question Pin
premprakashbhati8-Apr-09 1:57
premprakashbhati8-Apr-09 1:57 
GeneralRe: how to ask a proper question Pin
Dave Kreskowiak8-Apr-09 3:23
mveDave Kreskowiak8-Apr-09 3:23 
GeneralRe: how to ask a proper question Pin
Ashfield8-Apr-09 5:53
Ashfield8-Apr-09 5:53 
Questionin crystal report Pin
rajancbe7-Apr-09 23:31
rajancbe7-Apr-09 23:31 
AnswerRe: in crystal report Pin
Anubhava Dimri8-Apr-09 0:34
Anubhava Dimri8-Apr-09 0:34 
QuestionHow to Set Trial Days Limitation in GUEST Accout Pin
Anubhava Dimri7-Apr-09 21:10
Anubhava Dimri7-Apr-09 21:10 

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.