[gpodder-devel] util.remove_html_tags optimizations

  • From: thp at perli.net (Thomas Perl)
  • Date: Thu, 20 Mar 2008 11:15:12 +0100

Hello, Nick!

On Wed, 2008-03-19 at 23:16 -0500, nikosapi wrote:
> While hunting a bug down today I found some code that was slowing down
> gPodder's loading time :D
> 
> The original bug was that in the episode descriptions I was still
> seeing stuff like ’. This is because the python codepoint2name
> dict doesn't include all of the possible unicode characters. So I
> replaced the old code with a regex that converts the codepoint numbers
> directly to unicode characters. In a quick benchmark I calculated that
> using the old code took 3.28 sec worth of load time whereas the new
> code uses < 0.1 sec of load time :)
> 
> Now what's really cool is that when I launch gPodder, it's ready to go
> in less than 2 seconds! (on an intel E6300)

Really great stuff! Thanks for the patch, I've applied in SVN trunk :)

Thomas



Other related posts: