require 'amrita/template'
require 'amrita/xml'

MAX = (ARGV[0] || "150").to_i
am_data = "foo"
text    = ""
for i in 0..MAX
  am_data = {:foo => am_data}
  text    = "<tag id=\"foo\">#{text}</tag>"
end

t = Amrita::TemplateText.new(text)
t.xml = true
#t.use_compiler = true
#t.set_hint_by_sample_data(am_data)
t1 = Time.now
t.expand($stdout, am_data)
t2 = Time.now
$stderr.puts (t2 - t1)
#puts t.src
