as someone that has written way too many ruby DSLs i would say use ERB.  it's easy to read for non-ruby experts, fast, built-in, and has good editor support.   can't really do better than that....   

--
- a
"be kind whenever possible.  it is always possible." --  h.h. the 14th dalai lama



On Thu, 18 May 2023 at 00:25, Peter Hickman via ruby-talk <ruby-talk@ml.ruby-lang.org> wrote:
I'm profiling some code to try and squeeze out performance. It takes a user query, reads data from the database and returned the result as XML

I have tuned the code and database (checking the indexes, caching repeated calls etc) and what I am left with is that 95% of the call's runtime is building the XML. We are using builder because it is the standard / default for Ruby

Using Ruby 3.0.2p107 as it is the default for Ubuntu 22.04

Is there another, faster library for XML generation or will I be building this by hand?

Any suggestions

 ______________________________________________
 ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
 To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
 ruby-talk info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.org/