Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8652867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:24:23+00:00 2026-06-12T14:24:23+00:00

I am doing simple app that gets some data from XML-RPC server and I

  • 0

I am doing simple app that gets some data from XML-RPC server and I noticed that HtmlUtilities.ConvertToText is really slow, here is the test that takes 900 ms on quad core machine :

    [TestMethod]
    public void TestHtmlToStringDogSlow()
    {
      string text = @"Zdjelice od dinje
Tartar od morskih delicija
Salata od ječma
Sirni namaz s avokadom
<p>Dosadili su vam uvijek isti namazi? Potpuno vas razumijemo i stoga nudimo namaz od avokada. Za one kojima treba više informacija, glavni su mu sastojci – uz avokado – pinjoli i svježi sir, a neodoljiv je uz prepečenac.</p>
Hladetina
<p>Popularno jelo s kolinja možete poslužiti i kao predjelo svečanog, pa i blagdanskog objeda ili večere, ali i kao samostalno malo jelo.</p>
Jaja u umaku od ajvara
<p>I kad vam nije do maštanja i velikih egzibicija, iz kuhinje možete iznijeti zanimljiva mala iznenađenja posve neočekivana okusa.</p>
Gurmanski zalogajčići
<p>Jelo – dosjetka ne vrednuje se ni brzinom pripreme ni brojem korištenih sastojaka, nego rezultatom. A ovi obogaćeni krekerčići zalogajčići su za bogove.</p>
Pikantni namaz od sira
<p>Dolaze vam gosti ili imate svježega kravljeg sira, a nemate ideju što biste s njime? Načinite vrlo zanimljiv i neuobičajen namaz, koji možete kratko sačuvati i u hladnjaku.</p>
Tuna <em>alla carpaccio</em>
<p>Iako je <em>carpaccio</em> izvorno od sirove zamrznute junetine odnosno govedine, priprema se od različitih namirnica. A pripremate li ga od ribe, ona osobito mora biti vrlo svježa.</p>
Namaz od svježeg sira i gorgonzole
<p>Gorgonzola i začinske trave i običnome sirnom namazu daju fini mediteranski štih. Uz pomno odabran kruh, pa s bademima i orasima, može se poslužiti i u svečanijim prilikama.</p>
Pašteta <em>Twist</em>
<p>Volite li paštete, i u njima možete uživati gurmanski. Idealno za veća okupljanja, za hladan bife.</p>
      ";

      var convertedItems = new List<string>();
      var items = text.Split(new string[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
      foreach (string oneItem in items)
      {
        string cnv = HtmlUtilities.ConvertToText(oneItem);
        //string cnv = oneItem.Replace("<p>", "").Replace("</p>", "");
        convertedItems.Add(cnv);
      }            
    }

I tried commenting the ConvertToText line and doing simple string.Replace, and then test takes only 2 ms. I am very aware that simple replace is very different from ConvertToText but just to put things to perspective.

So my question is does anyone has experience this slowness when using HtmlUtilities.ConvertToText ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:24:25+00:00Added an answer on June 12, 2026 at 2:24 pm

    Yes, I have seen this as well. I have an app that loads data from a syndication feed. When I use this method, performance is absolutely horrible. Instead, I used regex to strip out the HTML tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly simple android app, it gets protobuf data from a web
I'm trying to adapt some code from a simple app that uses Raphael to
I just started with Android and I'm doing a simple app that I want
I am making a simple static app in HTML5. What I am doing now
I am doing a Canvas app inside the facebook page. My very simple question
I'm considering the feasibility of doing simple reporting on Trello data. My quick review
I have an iPhone app that will let users email some pre-determined text as
I have an iphone app that uses Core Data to do storage. I have
I am writing a Catalyst web application that presents some data that does not
I am working on a simple Perl app that copies another Perl app and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.