Creating HTML tags and marking text as HTML is pretty slow because it isn't vectorised. It would be great to have vectorised interface for such situations. This would help to improve the performance of rendering big tables with {gt}.
In https://github.com/rstudio/gt/pull/1470 I improved the performance of rendering a gt table. There are some more optimisations to be done but now about a quarter of the time is spent in htmltools::tag() and htmltools::HTML().
Overall, I think improving the performance of creating HTML and the rendering would be a great help for gt (and other packages that need to render a bit more HTML).
Creating HTML tags and marking text as HTML is pretty slow because it isn't vectorised. It would be great to have vectorised interface for such situations. This would help to improve the performance of rendering big tables with {gt}. In https://github.com/rstudio/gt/pull/1470 I improved the performance of rendering a gt table. There are some more optimisations to be done but now about a quarter of the time is spent in
htmltools::tag()
andhtmltools::HTML()
.Overall, I think improving the performance of creating HTML and the rendering would be a great help for gt (and other packages that need to render a bit more HTML).