Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

pluggable html parser

#21

It would be nice if there was the possibility of using hpricot instead of nokogiri.
They should be API compatible.

In my tests, hpricot was always a tiny bit faster

Reported by rb2k · May 4th, 2010 @ 03:16 PM

State: resolved
Milestone: none
Assigned to: chris (at chriskite) chris (at chriskite)

Activity

  1. rb2k
    rb2k

    Here are some performance benchmarks.
    Switching from CSS to xpath also results in speed boosts:

    http://gist.github.com/391134

    (tl;dr: hpricot (xpath) took: 3.599083
    hpricot (xpath, no href) took: 3.283622
    hpricot (css) took: 4.996853
    nokogiri (xpath) took: 4.169071
    nokogiri (css_nocontent) took: 4.372877
    nokogiri (css) took: 4.494918
    nokogiri (xpath no href) took: 3.861592
    )

    May 5th, 2010 @ 12:33 PM

  2. chris (at chriskite)
    chris (at chriskite)
    • State changed from new to resolved
    • Assigned user set to chris (at chriskite)

    Thanks for your patch, I've incorporated your change to parse links with xpath instead of CSS.

    I don't plan to include pluggable parser support for a couple of reasons: it increases complexity of the codebase without giving much in return, and potentially ties the project to using a restricted API (i.e. only what is common to Nokogiri and hpricot).

    May 25th, 2010 @ 09:12 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.