Closed gergness closed 1 year ago
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
07f3990
) 90.94% compared to head (eda0a1e
) 90.94%.:exclamation: Current head eda0a1e differs from pull request most recent head 728a00a. Consider uploading reports for the commit 728a00a to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Regarding 2:
a) Perhaps the option name could be even clearer, e.g. crunch.names.excludes.hidden.private.variables
, or a positive version crunch.names.includes.hidden.private.variables
? I think I prefer this last version, but I'm probably above-average in my tolerance for long names. :)
b) Yeah, I think I'd want to keep backward compatibility on this. What if we added a startup message, so that after users call library(crunch)
they see something like: "Experiencing slow autocompletion of variable names? See: {{link}}" ... and the link would tell them about this option & its implications, without the need to be super terse.
I'm less sure of how this newest option that I pushed today (crunch.order.var.catalog
) will work, but want to push this to master so I can try running with it.
Allows users to opt out of some performance problems introduced by the lazy variables catalog.
For context @sluga, early on when I started at crunch, the main variables catalog contained whether each variable was hidden or not. When we added "private" (aka "secure" variables according to the API, though Mike hates this word), we switched to having to navigate the hidden/private variable folder hierarchy to figure out which variables were hidden or private.
This PR:
crunch.exclude.hidden.private
that when set to FALSE (not the default), includes hidden/private variables innames(ds)
. This fixes weird behavior because RStudio's autocompletion usesnames()
when it detects the userds$
, so RStudio users have weird stuttering with datasets with non-trivial hidden/private variable folder structures.I think that 1. is an unambiguous win, I hadn't realized how easy it would be to fix, I thought these 2 problems were more entangled and so didn't realize I could fix it without messing with names. I believe that using this update version of rcrunch, will allow the rankinator to set
set_crunch_opts(crunch.warn.hidden = FALSE, crunch.warn.private=FALSE)
and then many operations will go from taking ~10 seconds to ~2. I kind of wonder if it should be the new default.I'm less sure about 2. It seems like a big change to me, but performance about hidden/private variables has been a real issue since rcrunch stopped using the variables catalog for it, and maybe the answer is that R users don't have easy differentiation on variable types.
Before this PR
Any action with a variable ends up loading the hidden & private variable catalogs even if you've turned off warnings about hidden and private variables.
After this PR
Turning off the warnings about hidden and secure variables avoids navigating the hidden & private folder hierarchies.