cynkra / collector

What the Package Does (One Line, Title Case)
0 stars 0 forks source link

Allow definition of `collector_fun` #13

Open krlmlr opened 7 months ago

krlmlr commented 7 months ago

This started as an attempt to filter the results of the collection before saving them to disk. Unclear if this is needed, but it does no harm.

The two subsequent commits add value. With that, a collection that previously took 40 GB now takes under 200 MB. Unfortunately, these commits can't be applied directly to the main branch.

moodymudskipper commented 7 months ago

A higher granularity variant would be to be able to provide for every patched functions the SE args that we should force. This specification can be generated automatically by a helper with a rule that every 1st arg is SE, then we can tweak it if desired. Note that we can technically walk up to check what args were ultimately evaled but it doesn't mean we can force them, because we sometimes need the promise first, and eval later. Unfortunately I don't think there's a way to know if a promise was captured before evaluation.