Unit: microseconds
expr min lq mean median uq max neval
raw_html() 2.242 3.5895 19.70312 5.5445 5.8605 1451.932 100
tag_to_char() 451.579 465.9735 505.45220 474.9260 494.0190 2081.677 100
tag_list_to_char() 1140.821 1158.0015 1309.62663 1178.0970 1285.7785 5321.876 100
I don´t know if that is a fair comparison but in my particular use case I have a large table in a shiny app. I compute html dropdown-inputs for each row. My first attempt using htmltools::tags and converting to character took several seconds to mutate the table (-> app unusable) while pasting raw html computed in the blink of an eye.
I would love to use htmltools here as pasting raw html really hurts my heart - thank´s for this amazing package btw 🙌
Converting
htmltools::tags
tocharacter
is very slow compared to writing plain html. TagLists make things even worse:My benchmark
I don´t know if that is a fair comparison but in my particular use case I have a large table in a shiny app. I compute html dropdown-inputs for each row. My first attempt using
htmltools::tags
and converting tocharacter
took several seconds to mutate the table (-> app unusable) while pasting raw html computed in the blink of an eye.I would love to use
htmltools
here as pasting raw html really hurts my heart - thank´s for this amazing package btw 🙌