rkrug / plantuml

R package to build UML graphs using plantuml
https://rkrug.github.io/plantuml/index.html
GNU General Public License v3.0
75 stars 8 forks source link

cache output of plantuml knitr engine #15

Open retorquere opened 4 years ago

retorquere commented 4 years ago

In the case of something like

```{plantuml name, plantuml.path="images"}
...


it should in principle be possible to hash the input and check if it has changed if the generated image could have the hash attached to it somehow (maybe in the metadata? filename would mean it would be harder to clean up)
rkrug commented 4 years ago

Knitr already implements a cache.

Please check https://yihui.org/knitr/demo/cache/ - it should in theory work (I hope).

retorquere commented 4 years ago

I don't think this works -- the plantuml chunks take about the same amount of time, and in the cache directory I see an .RData, .rdb abd .rdx file per chunk, but not a png.

rkrug commented 4 years ago

I tried it once, and I think it worked, but I think I did have plantuml.preview = FALSE.

rkrug commented 4 years ago

Could yo please check with plantuml.preview = FALSE and report back? Thanks.

retorquere commented 4 years ago

I have tried it with preview off -- it is a little faster, maybe? It's hard to actually tell, it's certainly not skipping all work. I still only see the same files in my cache directory also.

rkrug commented 4 years ago

Thanks - I will look into this. For the moment, I have no answer on the why and how.

rkrug commented 1 year ago

Needs to be checked with 0.6.5 onwards.