-
Notifications
You must be signed in to change notification settings - Fork 20
docs: improve documentation of prudence
argument
#589
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
base: main
Are you sure you want to change the base?
Conversation
@@ -30,22 +30,19 @@ knitr::opts_chunk$set( | |||
Sys.setenv(DUCKPLYR_FALLBACK_COLLECT = 0) | |||
``` | |||
|
|||
Unlike traditional data frames, duckplyr defers computation until absolutely necessary, allowing DuckDB to optimize execution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is explained better in one of the sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but is this sentence harmful here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be discouraging to have a first sentence that's "complicated".
Thrifty duckplyr frames are a compromise between lavish and frugal, discussed further below. | ||
Thrifty duckplyr frames are a compromise between lavish and frugal, discussed below. | ||
|
||
### Thrift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the previous location of this section a bit jarring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to give the readers time to digest "lavish" and "frugal".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to me when reading was that I saw it would be discussed later and thought, ok then. But when the "Thrift" section appeared, it felt misplaced.
@@ -198,7 +233,7 @@ flights_frugal[[1]] | |||
``` | |||
|
|||
|
|||
### Enforcing DuckDB operation | |||
### Side effect: Enforcing DuckDB operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an important section but also does not go with the flow of the rest of the vignette.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, moving to "fallback".
Later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the PR where I edit the fallback vignette, I added a section about this but that refers to this vignette.
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 00b4546 is merged into main:
Further explanation regarding interpretation and methodology can be found in the documentation. |
This would be easier to review in two PRs. Will split and review individually. |
Other commit now in #593. |
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 3385047 is merged into main:
Further explanation regarding interpretation and methodology can be found in the documentation. |
f404f17
to
3f29cba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping open for discussion.
@@ -30,22 +30,19 @@ knitr::opts_chunk$set( | |||
Sys.setenv(DUCKPLYR_FALLBACK_COLLECT = 0) | |||
``` | |||
|
|||
Unlike traditional data frames, duckplyr defers computation until absolutely necessary, allowing DuckDB to optimize execution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but is this sentence harmful here?
|
||
- **lazy materialization**: Unlike traditional data frames, duckplyr defers computation until absolutely necessary, i.e. lazily, allowing DuckDB to optimize execution. | ||
- **prudence**: Automatic materialization is controllable, as automatic materialization of large data might otherwise inadvertently lead to memory problems. | ||
|
||
The term "prudence" is introduced here to set a clear distinction from the concept of "laziness", and because "control of automatic materialization" is a mouthful. | ||
|
||
## Eager and lazy computation | ||
## DuckDB optimization: lazy evaluation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"lazy evaluation" is easy to confuse with how R handles arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, this should be "lazy computation", sorry.
Thrifty duckplyr frames are a compromise between lavish and frugal, discussed further below. | ||
Thrifty duckplyr frames are a compromise between lavish and frugal, discussed below. | ||
|
||
### Thrift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to give the readers time to digest "lavish" and "frugal".
@@ -198,7 +233,7 @@ flights_frugal[[1]] | |||
``` | |||
|
|||
|
|||
### Enforcing DuckDB operation | |||
### Side effect: Enforcing DuckDB operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, moving to "fallback".
Later.
Fix #508
And some other suggested changes for readability.