- Регистрация
- 16.05.2014
- Сообщения
- 145
- Благодарностей
- 23
- Баллы
- 18
Hello, first of all i dont have much knowledge about how multithreading, C# and importing libraries works - thats why i am asking the question.
My projects work without browser, i am importing HtmlAgilityPack.dll, System.XML in gac references and in directivies:
Then inside a project i am executing C# code like that:
Running this at 150 threads is eating all of my cpu (but it still works fine - no lags or other issues on the machine - is it false usage?).
(even at 30-50 threads cpu is jumping up to 99%)
Wheres the problem?
http://htmlagilitypack.codeplex.com/ < for dll library (i am using the one in Net45 folder)
My projects work without browser, i am importing HtmlAgilityPack.dll, System.XML in gac references and in directivies:
Then inside a project i am executing C# code like that:
C#:
HtmlDocument doc = new HtmlDocument();
var asd = project.Variables["BROWSER_response"].Value;
doc.LoadHtml(asd);
// get all comment nodes using XPATH
foreach (HtmlNode comment in doc.DocumentNode.SelectNodes("//comment()"))
{
comment.ParentNode.RemoveChild(comment);
}
return doc.DocumentNode.OuterHtml;
(even at 30-50 threads cpu is jumping up to 99%)
Wheres the problem?
http://htmlagilitypack.codeplex.com/ < for dll library (i am using the one in Net45 folder)
Вложения
-
11,9 КБ Просмотры: 174