I found that it was OK to mix kotlinx html and htt...
# http4k
j
I found that it was OK to mix kotlinx html and http4k templates... when the list is large, handlebars was a bit slow... so just insert a raw thing into the handlebars.
Copy code
return createHTML().tbody {
        items.map { r ->
            tr {
                td(classes = "align-middle") { +"${r.rank}" }
                td(classes = "align-middle") {
                    a("${r.uri}") { +"${r.name}" }
....
Wouldn't use it all the time, but got the job done...
m
Have you benchmarked to verify that this is indeed faster?
This test suggests that kotlinx.html is quite slow, slower than handlebars.
j
Well, it was faster for me. I can't really speak to some random microbenchmarks... i guess the only thing that matters is how some thing works in the specific case you have.
👍 1