R bioconductor package `rtracklayer` possible memory leakage
0
0
Entering edit mode
5.5 years ago
Chirag Parsania ★ 2.0k

Hi, I have been stretching my head to understand possible memory usage in one of my complex R script. What I found is quite surprising. Using a function rtracklayer::readGFF() occupies quite a bit memory (about 400 MB) in the R even without loading the package rtracklayer. See the step by step use case and output.

NOTE: Though question is more about programming and related to R, I find it worth posting to the biostars as rtracklayer is well used in the bioinformatics community.


Amount of memory used in fresh R session. (NOTE: No prior package or objects are loaded)

## fresh R session memory usage 
pryr::mem_used()
39.4 MB

Amount of memory used once rtracklayer::readGFF() function executed.

## read gff using rtracklayer::readGFF(), (NOTE: no file supplied to the  function)

rtracklayer::readGFF()
pryr::mem_used()
416 MB

As we can see, there is 10X larger memory occupied though nothing has been returned from the rtracklayer::readGFF() execution. Can anyone explain why this is ? and how to prevent R occupying additional ~400 MB of memory while using rtracklayer::readGFF() ?

gff R bioconductor memory leakage • 1.3k views
ADD COMMENT
0
Entering edit mode

This post is more suitable to GitHub issues, see:

ADD REPLY
0
Entering edit mode

i did but it got deleted :(, i think

ADD REPLY
0
Entering edit mode

What do you mean "got deleted"? The author deleted it?

ADD REPLY
0
Entering edit mode

Sorry. !! Now it appears there. GitHub behaving weirdly. See the link in above comment.

ADD REPLY
0
Entering edit mode

They're having data consistency issues, so things will be weird for the next few hours at least.

ADD REPLY

Login before adding your answer.

Traffic: 2484 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6