I am using foundation as front end framework,premailer for rendening inline css in my RoR project.The email content i generate in my application are huge.It takes lot of time to convert CSS inline.
class Premailer
module Adapter
module Nokogiri
def to_inline_css
....
doc.search(selector).each ...
.....
end
end
end
end
doc.search(selector) is super slow for huge content in doc.
It takes about 15 -20 seconds to render http://foundation.zurb.com by making CSS inline in http://premailer.dialect.ca/.
Please suggest an efficient way to convert HTML pages with inline css