Closed andrie closed 3 years ago
Packrat searches for recursive dependencies in the getPackageRecords() function.
However, if a package appears multiple times in the search tree, this recursion will run multiple times.
This PR optimizes the search tree by memorizing whether a package was searched before, and if so, skips the search the next time.
For my test case, this reduces the packrat snapshot time from 71 sec to 14 sec.
packrat
Replaced by https://github.com/rstudio/packrat/pull/615 (now merged).
Packrat searches for recursive dependencies in the getPackageRecords() function.
However, if a package appears multiple times in the search tree, this recursion will run multiple times.
This PR optimizes the search tree by memorizing whether a package was searched before, and if so, skips the search the next time.
For my test case, this reduces the
packrat
snapshot time from 71 sec to 14 sec.