Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Background Thread execution time Pin
Judah Gabriel Himango17-Oct-06 6:07
sponsorJudah Gabriel Himango17-Oct-06 6:07 
GeneralRe: Background Thread execution time Pin
DMBFiredancer17-Oct-06 6:12
DMBFiredancer17-Oct-06 6:12 
GeneralRe: Background Thread execution time Pin
Judah Gabriel Himango17-Oct-06 6:36
sponsorJudah Gabriel Himango17-Oct-06 6:36 
GeneralRe: Background Thread execution time Pin
DMBFiredancer17-Oct-06 7:16
DMBFiredancer17-Oct-06 7:16 
GeneralRe: Background Thread execution time Pin
Judah Gabriel Himango17-Oct-06 9:59
sponsorJudah Gabriel Himango17-Oct-06 9:59 
GeneralRe: Background Thread execution time Pin
DMBFiredancer18-Oct-06 3:01
DMBFiredancer18-Oct-06 3:01 
GeneralRe: Background Thread execution time Pin
Judah Gabriel Himango18-Oct-06 4:46
sponsorJudah Gabriel Himango18-Oct-06 4:46 
GeneralRe: Background Thread execution time Pin
DMBFiredancer18-Oct-06 5:22
DMBFiredancer18-Oct-06 5:22 
Judah Himango wrote:
Is it possible to post your project? I'm pretty sure I could fix it if I've got it here sitting in front of me.

When you run it under the performance profiler, which lines are taking longer? Surely the string comparison and manipulation isn't taking longer on a background thread?


Unfortunately I'm not able to send my project. But I did look at the profiler a little more and can give you some more information on the lines of code that seem to be causing the slowdown.

The dataobject that I pass into the method that takes a long time has a few properties that are List<htmlelement>. I loop through all these and analyze the individual HtmlElements contained within the list.

When I do the following:

<br />
string href = link.GetAttribute("href");<br />

*where link is an HtmlElement that is contained in the list that's a property of the passed in DataObject

or

<br />
if((currentelement.Name == destination &&<br />
   currentelement.TagName.ToUpper() == "A") ||<br />
   currentelement.Id == destination)<br />

*where currentelement is an HtmlElement that is contained in the list that's a property of the passed in DataObject

When I access the properties of the HtmlElement within the background thread is when the excessive execution takes place. This may have to do with HtmlElement actually being a COM object with the .NET wrapper around it?

Hopefully this gives you some more info Smile | :) I appreciate your time looking into this.
GeneralRe: Background Thread execution time Pin
Judah Gabriel Himango18-Oct-06 7:16
sponsorJudah Gabriel Himango18-Oct-06 7:16 
GeneralRe: Background Thread execution time Pin
DMBFiredancer18-Oct-06 7:19
DMBFiredancer18-Oct-06 7:19 
QuestionInserting an HTML document into a database (SQL problem) Pin
AngryC16-Oct-06 9:40
AngryC16-Oct-06 9:40 
AnswerRe: Inserting an HTML document into a database (SQL problem) Pin
Guffa16-Oct-06 11:15
Guffa16-Oct-06 11:15 
AnswerRe: Inserting an HTML document into a database (SQL problem) Pin
Judah Gabriel Himango16-Oct-06 11:34
sponsorJudah Gabriel Himango16-Oct-06 11:34 
QuestionSimple NumericUpDown Question Pin
Cerasti16-Oct-06 8:36
Cerasti16-Oct-06 8:36 
AnswerRe: Simple NumericUpDown Question Pin
Judah Gabriel Himango16-Oct-06 11:16
sponsorJudah Gabriel Himango16-Oct-06 11:16 
GeneralRe: Simple NumericUpDown Question Pin
Cerasti17-Oct-06 8:58
Cerasti17-Oct-06 8:58 
GeneralRe: Simple NumericUpDown Question Pin
Judah Gabriel Himango17-Oct-06 9:57
sponsorJudah Gabriel Himango17-Oct-06 9:57 
QuestionHow to set Size of My Icon in button.Image ? Pin
hdv21216-Oct-06 7:30
hdv21216-Oct-06 7:30 
AnswerRe: How to set Size of My Icon in button.Image ? Pin
Christian Graus16-Oct-06 7:42
protectorChristian Graus16-Oct-06 7:42 
QuestionCustom controls in a listbox? Pin
Michael Hendrickx16-Oct-06 7:29
Michael Hendrickx16-Oct-06 7:29 
AnswerRe: Custom controls in a listbox? Pin
Judah Gabriel Himango16-Oct-06 11:11
sponsorJudah Gabriel Himango16-Oct-06 11:11 
QuestionInteropServices Pin
Andy H16-Oct-06 6:10
Andy H16-Oct-06 6:10 
AnswerRe: InteropServices Pin
Andy H16-Oct-06 6:42
Andy H16-Oct-06 6:42 
QuestionWMI Interface to Microsoft DNS in C#.NET Pin
gmorse2@cox.net16-Oct-06 4:39
gmorse2@cox.net16-Oct-06 4:39 
QuestionLines disappear Pin
ssoffline16-Oct-06 3:56
ssoffline16-Oct-06 3:56 

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.