You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What does fmemopen() do in file format readers? #1023
Is this code correct at all? It seems to me that depending on this macro, pvfile is interpreter either as the contents of a file, or a file name. These are not interchangeable.
If this code is present, why are we not making use of HAVE_FMEMOPEN?
This needs to be reviewed by someone familiar with R internals and R's facilities to treat strings as files. Can we make use of this and gain better performance when parsing contents of strings?
Related: f936f3c This references a "bug 604907" which I cannot find (@ntamas is this an old Launchpad bug?) The claim that fmemopen is too slow is very surprising ...
fmemopen is available on macOS now, and it is definitely much faster than creating a file and reading from it if the data is not too large. We do use fmemopen to improve fuzzing performance.
Supporting fast reading from strings would be a new feature that takes time to implement. It takes a lot more than just defining HAVE_FMEMOPEN.
For now, I would recommend removing all mentions of HAVE_FMEMOPEN, as this is broken and dead code that's just confusing, and blocks auto-generation of these functions.
Activity
szhorvat commentedon Dec 25, 2023
Related: f936f3c This references a "bug 604907" which I cannot find (@ntamas is this an old Launchpad bug?) The claim that
fmemopenis too slow is very surprising ...szhorvat commentedon Dec 25, 2023
It was probably this bug: igraph/igraph#197
fmemopenis available on macOS now, and it is definitely much faster than creating a file and reading from it if the data is not too large. We do usefmemopento improve fuzzing performance.szhorvat commentedon Dec 25, 2023
Supporting fast reading from strings would be a new feature that takes time to implement. It takes a lot more than just defining
HAVE_FMEMOPEN.For now, I would recommend removing all mentions of
HAVE_FMEMOPEN, as this is broken and dead code that's just confusing, and blocks auto-generation of these functions.maelle commentedon Jul 6, 2026
Sort of related: #2717