psychelzh / g-factor

Basic analysis results
https://psychelzh.github.io/g-factor/
Other
0 stars 0 forks source link

Memory is crying: a lesson for better branching #4

Closed psychelzh closed 1 year ago

psychelzh commented 1 year ago

It is so hard to separate this into branches for further analysis. This object is too large!

https://github.com/psychelzh/model-behav/blob/b7276c4bc09b219da774caf724af9e88b2cd8b08/R/targets_g_stability.R#L92-L108

psychelzh commented 1 year ago

There is a way! Use iteration = 'list', and further branches should be relied on the pattern. But this will break the old run!

psychelzh commented 1 year ago

{targets} cannot host thousands of targets in fact. If so, the overhead will drive mad! Luckily, we can do batching. See https://github.com/ropensci/targets/issues/171 and the manual. Do not neglect the caveat the author gives.