# Rxml vs rhtml

**URL:** <https://www.ruby-forum.com/t/rxml-vs-rhtml/95210>\
**Category:** Rails\
**Created:** [May 24, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210 "2006-05-24T19:04:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![darushin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@darushin](https://www.ruby-forum.com/u/darushin)\
**Post date:** [May 24, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210/1 "2006-05-24T19:04:26Z")

</div>

I have been wondering if anyone here knows which format is faster for  
your templates? I am curious cause in the near future I may be using  
some expensive scripts (timewise) and would like to try and squeak out  
as much performance as possible. Is Ruby like other languages (ASP  
classic for example) that inccur a penalty by switching between HTML and  
Ruby Code?

Ben

---

<div class="post-metadata">

**Author:** ![darushin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@darushin](https://www.ruby-forum.com/u/darushin)\
**Post date:** [May 24, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210/2 "2006-05-24T19:35:12Z")

</div>

I’m not entirely sure what you mean. I don’t really see how there can  
be a difference, either with Ruby or with ASP. HTML is XML, just a  
specific implementation, and there won’t be a difference as far as I  
can see. Of course, someone wiser may tell you otherwise.  
-N

---

<div class="post-metadata">

**Author:** ![darushin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@darushin](https://www.ruby-forum.com/u/darushin)\
**Post date:** [May 24, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210/3 "2006-05-24T20:49:15Z")

</div>

On 5/24/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m not entirely sure what you mean. I don’t really see how there can  
> be a difference, either with Ruby or with ASP. HTML is XML, just a  
> specific implementation, and there won’t be a difference as far as I  
> can see. Of course, someone wiser may tell you otherwise.  
> -N

I think he’s asking which is faster, ERB (rhtml) or Builder (rxml).  
I’ve not used Builder or done any benchmarks so I’m afraid I can’t  
answer the question. I doubt that the bottleneck in the application  
will be the template language, though I suppose it is possible.

---

<div class="post-metadata">

**Author:** ![darushin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@darushin](https://www.ruby-forum.com/u/darushin)\
**Post date:** [May 25, 2006, 3:09pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210/4 "2006-05-25T15:09:14Z")

</div>

unknown wrote:

> I’m not entirely sure what you mean. I don’t really see how there can  
> be a difference, either with Ruby or with ASP. HTML is XML, just a  
> specific implementation, and there won’t be a difference as far as I  
> can see. Of course, someone wiser may tell you otherwise.  
> -N

Actually with ASP 3.0, using intermixed statemtents caused a big  
performance bottleneck to the point micorsoft actually recommended that  
users group their statement types into as large of blocks as possible  
and use the Response.Write method wherever possible.

I was wonder if Ruby had similar issues with respect to Builder or ERB.  
From the sounds of it though it seems that it really doesn’t matter.

Ben

---

<div class="post-metadata">

**Author:** ![darushin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@darushin](https://www.ruby-forum.com/u/darushin)\
**Post date:** [May 24, 2006, 9:11pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210/5 "2006-05-24T21:11:17Z")

</div>

Ah, yes, sorry about that. But yes, I concur. There’s no point  
spending ages with the decision. I would suggest you go with ERb  
because it’s more widely used.  
-N

---

<div class="post-metadata">

**Author:** ![darushin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@darushin](https://www.ruby-forum.com/u/darushin)\
**Post date:** [May 25, 2006, 3:19pm UTC](https://www.ruby-forum.com/t/rxml-vs-rhtml/95210/6 "2006-05-25T15:19:52Z")

</div>

Ok, so we’re going slightly off topic here. But I’m not disputing that  
there was a performance hit when switching between ASP and HTML. But  
that performance hit would have been just the same as when switching  
between ASP and XML. You see my point now? But anyway, that’s a bit a  
irrelevant now, because I’m never going back to ASP, nevermind ASP  
3.0, and I wasn’t aware you were talking about the difference between  
ERb and Builder, so my initial point was a little irrelevant anyway.  
-N
