Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way too much data saved for pipe calls #15

Closed
krlmlr opened this issue Apr 24, 2024 · 2 comments · Fixed by #16
Closed

Way too much data saved for pipe calls #15

krlmlr opened this issue Apr 24, 2024 · 2 comments · Fixed by #16

Comments

@krlmlr
Copy link
Contributor

krlmlr commented Apr 24, 2024

This prompted the inhibition of recursion in #13, but we actually need this data.

Sys.setenv(COLLECTOR_PATH = ".")
options(conflicts.policy = list(warn = FALSE))
library(dplyr)

data.frame(a = 1) %>%
  filter(a == 1) %>%
  mutate(b = 2) %>%
  select(a)
#>   a
#> 1 1

data.frame(a = 1) |>
  filter(a == 1) |>
  mutate(b = 2) |>
  select(a)
#>   a
#> 1 1

d1 <- data.frame(a = 1)
d2 <- filter(d1, a == 1)
d3 <- mutate(d2, b = 2)
d4 <- select(d3, a)

fs::dir_info(glob = "*.qs")[1:3]
#> # A tibble: 9 × 3
#>   path            type         size
#>   <fs::path>      <fct> <fs::bytes>
#> 1 00001-filter.qs file        1.14M
#> 2 00002-mutate.qs file        1.37M
#> 3 00003-select.qs file          244
#> 4 00004-filter.qs file        1.51M
#> 5 00005-mutate.qs file        1.51M
#> 6 00006-select.qs file          242
#> 7 00007-filter.qs file          231
#> 8 00008-mutate.qs file          232
#> 9 00009-select.qs file          228

Created on 2024-04-24 with reprex v2.1.0

@krlmlr
Copy link
Contributor Author

krlmlr commented Apr 24, 2024

It's the call that consumes all the memory, not the env 🤦

@krlmlr
Copy link
Contributor Author

krlmlr commented Apr 24, 2024

And clearing the attributes helps. PR in a minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant