README.md

fasttags

A package that renders htmltools tag graphs much, much faster than the normal methods.

Just pass your tag object to the fastrender function; it's approximately equivalent to calling htmltools::doRenderTags (which is itself a lower-level, less featureful version of htmltools::renderTags).

> bigtags <- tags$select(name="foo", lapply(1:5e4, function(i) {tags$option(value=i, i)}))
> system.time(renderTags(bigtags))
   user  system elapsed 
 27.242   0.195  27.509 
> system.time(doRenderTags(bigtags))
   user  system elapsed 
 11.292   0.141  11.590 
> system.time(fastrender(bigtags))
   user  system elapsed 
  0.155   0.004   0.161 

Limitations

fastrender is not, today, a drop-in replacement for htmltools::renderTags. The latter has a number of features that are not currently supported in this package:

As a result, this package should only really be used for simple-yet-large object graphs. htmlwidgets in particular will probably not work.

Installation

devtools::install_github("jcheng5/fasttags")

License

GPL >=2



jcheng5/fasttags documentation built on May 18, 2019, 10:22 p.m.