Support user-settable memory allocation limit#346
Merged
eddelbuettel merged 4 commits intomasterfrom Jan 14, 2022
Merged
Conversation
|
This pull request has been linked to Shortcut Story #13173: Be smarter about minimal size allocated for character data. |
f616b8d to
8b7eaa0
Compare
ihnorton
requested changes
Jan 13, 2022
Member
ihnorton
left a comment
There was a problem hiding this comment.
As discussed, let's change this to be per-column.
Contributor
Author
|
Now I recall t he other reason why I divided: the value from our config object is somewhat yuge. Using it per column may lead to multiple yuge allocations. On the other hand, it affects (var)char only, and I pull the non-char value. |
8b7eaa0 to
fc3e3e1
Compare
fc3e3e1 to
3cd454f
Compare
Contributor
Author
|
As discussed, with one more pass over it for a default value which makes the initial setting simpler -- load* called at package load, lightweight getters afterwards. (One minor documentation warning fixed by tiny doc edit too.) |
ihnorton
approved these changes
Jan 14, 2022
Member
|
Thanks! |
249cc48 to
5345d72
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Memory requirements for sparse arrays are difficult to asses ex-ante. This PR adds a user-setable parameter which will be used for variable-sized character buffers.
The setup follows what is used for the
return_aspreference. A value can stored in per-user config file (with location managed by R using itstools::R_user_dir()function following XDG conventions) from where it is retrieve and used in the per-package run-time environment. The value can also be override per-session.