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
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
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.
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
On 05/07/07, Nicholas Faiz <nichol...@gmail.com> wrote:
>
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