Lilu formatting speed

1 view
Skip to first unread message

Nicholas Faiz

unread,
Jul 5, 2007, 5:21:03 AM7/5/07
to lilu-te...@googlegroups.com
Hi,

I'm thinking of using lilu for my next project, but as I haven't used it
yet, and haven't even had time to test it, I wanted to ask about how
slow it actually was.

I used to use Sitemesh, when programming in J2EE, which used the
Decorator pattern to reform the structure of the HTML document.

http://opensymphony.com/sitemesh/

It's not equivalent in process, but the reason I mention it is that it
wasn't at all slow to use. Perhaps I have to be more cautious with Ruby,
though, in considering such work, as it's never been the fastest
language at parsing SGML documents.

But, I also think a caching option could overcome slowness? Any thoughts
here?

Thanks in advance.

--
Regards,
Nicholas Faiz

+61 (0)410 285 531
nich...@treefallinginthewoods.com
http://treefallinginthewoods.com

Michael Klishin

unread,
Jul 5, 2007, 5:31:57 AM7/5/07
to lilu-te...@googlegroups.com
Caching mostly eliminates need for DOM parser rewritten as C
extension. For large projects caching strategy is the only way for
application to remain up and running under heavy load.

So this is a way to go. Google for Memcached and Rails, there are
several different plugins.

On 05/07/07, Nicholas Faiz <nichol...@gmail.com> wrote:

> But, I also think a caching option could overcome slowness? Any thoughts
> here?
>
> Thanks in advance.

--
MK

Yurii Rashkovskii

unread,
Jul 5, 2007, 7:15:00 AM7/5/07
to lilu-te...@googlegroups.com
Also I personally think that Rails page caching could be useful for
handling performance issues as well.

Yurii Rashkovskii

unread,
Jul 5, 2007, 7:25:44 AM7/5/07
to lilu-te...@googlegroups.com
Nicholas,

On Jul 5, 2007, at 11:21 AM, Nicholas Faiz wrote:

>
> Hi,
>
> I'm thinking of using lilu for my next project, but as I haven't
> used it
> yet, and haven't even had time to test it, I wanted to ask about how
> slow it actually was.

The slowest operation is #populate, so be cautious when using it on a
large datasets.

>
> I used to use Sitemesh, when programming in J2EE, which used the
> Decorator pattern to reform the structure of the HTML document.
>
> http://opensymphony.com/sitemesh/

Haven't used it when I was doing Java programming, can't really feel
its taste. Though as far as I can understand from a tutorial, it is
not quite the same as Lilu since it adds "special" tags (using
taglibs) to HTML.

>
> It's not equivalent in process, but the reason I mention it is that it
> wasn't at all slow to use. Perhaps I have to be more cautious with
> Ruby,
> though, in considering such work, as it's never been the fastest
> language at parsing SGML documents.

Actually, as per my own measures and benchmarks, parsing XHTML takes
roughly 10% of time when using Lilu. So the most significant problem
is lookuping and updating elements, especially on massive operations.

>
> But, I also think a caching option could overcome slowness? Any
> thoughts
> here?

Yes, the easiest answer is caching. Another way is to reimplement
Hpricot completely in C (or find a decent replacement), which is not
that easy.
Though, it may be worth trying, I'm still considering it... I think
that until someone will break into major slowness problems, it is
worth experimenting with various caching models (page caching, may be
sort of an integration with caches.rb, etc.), and if it will not
help, it will be worth to invest in C programming.


Yurii.

Nicholas Faiz

unread,
Jul 5, 2007, 7:49:07 AM7/5/07
to lilu-te...@googlegroups.com
Thanks for the response. I'm aware of memcached, I was really just
trying to get a feel for what it's to use lilu in production code. I
don't want there to be an awkward pause while the page loads, and I'd
probably have to rely upon a cache to make sure it wasn't evident most
of the time.

Nicholas Faiz

unread,
Jul 5, 2007, 7:50:29 AM7/5/07
to lilu-te...@googlegroups.com
Yurii,

Ok. I think at this stage I'd probably be prepared to give it a go so
long as I can combine caching with it from the start. Rails standard
caching should be fine, but I'll look into other caching lib.s (like
memcached).

Thanks,
Nicholas

Michael Klishin

unread,
Jul 5, 2007, 9:33:45 AM7/5/07
to lilu-te...@googlegroups.com
Keep us notified on your progress. Actually we are going to use Lilu
in production quite soon.

On 05/07/07, Nicholas Faiz <nichol...@gmail.com> wrote:
>

Nicholas Faiz

unread,
Jul 6, 2007, 1:29:10 AM7/6/07
to lilu-te...@googlegroups.com
Michael,

Will do. I'm still working out if lilu is what we'll be using, but if we
do pair with a pure HTML guru, it will be.

Nicholas

Reply all
Reply to author
Forward
0 new messages