Conversation
|
No obvious timing issues in HEAD=fread_connections Generated via commit fd866b7 Download link for the artifact containing the test results: ↓ atime-results.zip
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7422 +/- ##
=======================================
Coverage 99.03% 99.04%
=======================================
Files 87 87
Lines 16930 17029 +99
=======================================
+ Hits 16767 16866 +99
Misses 163 163 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Looking forward to reviewing this. I was wondering who was going to be
the first brave soul to start using the connections API after they
"officially" became experimental in r88181-r88223 (April-May 2025). Not
counting the even braver souls who've been working around the non-API
checks, 'curl' and 'iotools' are the only CRAN packages that openly
link to these entry points (as they have been doing for a long time).
|
Member
Author
|
I guess there are some more cool kids on the CRAN block using |
aitap
reviewed
Nov 9, 2025
Member
aitap
left a comment
There was a problem hiding this comment.
Should be good after fixing the potential resource leak caused by errors in R_ReadConnection.
Co-authored-by: aitap <krylov.r00t@gmail.com>
Co-authored-by: aitap <krylov.r00t@gmail.com>
Co-authored-by: aitap <krylov.r00t@gmail.com>
ben-schwen
commented
Nov 10, 2025
Wrap the helper functions too. Avoid double negatives.
Otherwise truncation occurs silently, possibly setting the limit to something like 100.
CHAR() could in theory return Latin-1 or UTF-8 text. translateChar() checks the encoding bits and only converts if needed, releasing the memory upon return from the .Call().
aitap
approved these changes
Mar 12, 2026
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.

Closes #561
Also closes #4329 with a nice workaround by just wrapping the file to read with
file()and use the connection interface.Spills to file since this seems to cover almost all cases. Also respects
nrowsparameter, so for peeking it does not need to spill the whole file.We can't magically make file connections faster since we do not have random access like with
mmap.For the benchmark below, note that my
tempdiralready points to my SSD (therefore we cant see a big difference) and I dont have a HDD on this PC.Extending this to
1e8rows instead of1e7and verbose also shows that half of the time spent is for spilling to disk (for large files).Details