Reduce peak memory usage during performance evaluation #450
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #440 by implementing the suggestion from #440 (comment). I can confirm that the reprex from #440 (comment) now runs through on my machine (the same machine that I was using originally for that reprex) and only errors at the end when the projection onto the full model takes place (which is probably due to #323; the error message is
Error in if (any(edgevals <- 0 < bdiff & bdiff < boundary.tol)) { :\nmissing value where TRUE/FALSE needed
). Running the reprex withnterms_max = 3
andpeakRAM::peakRAM()
around thevarsel()
expression (twice; takes long enough) confirms the reduction of peak memory usage: