rthreejs
rthreejs copied to clipboard
Continues increase in memory usage in firefox
When I generate an app that continuously regenerate the world the memory usage of Firefox continuously increases I use Firefox 40.0.3 on Ubuntu
This is the memory usage as reported by top if the application is loaded and after moving the slider 3 times:
$ top -n 1 -b -c -p 16174 | grep fire
16174 bart 20 0 2166056 1,082g 99344 S 33,2 14,0 1:28.64 /usr/lib/firefox/firefox
$ top -n 1 -b -c -p 16174 | grep fire
16174 bart 20 0 4598276 3,395g 127136 S 0,0 44,0 1:49.08 /usr/lib/firefox/firefox
This is the application used (the large N is to exaggerate the problem, my guess is it also happens with a small N but i did not check extensively)
require(shiny)
require(threejs)
ui<-shinyUI({fluidPage(titlePanel("a"),
sidebarLayout(
sidebarPanel(sliderInput('seed','Seed',0,100, step = 1,value = 1)),mainPanel( globeOutput('asdf'))))
})
ser<-shinyServer(function(input, output){
output$asdf<- renderGlobe({set.seed(input$seed); n<-50000
globejs(lat=runif(n,-90,90), long=runif(n, -180,180))})
})
runApp(shinyApp(ui,ser), launch.browser = T)
Can you try this again with the current version 0.3.0? I think it should be fixed.
I just gave it a quick test and the issue does not seem to be resolved, some system info for good measure:
$ firefox -v
Mozilla Firefox 53.0
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.10
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] threejs_0.3.0 igraph_1.0.1 shiny_1.0.2
loaded via a namespace (and not attached):
[1] Rcpp_0.12.10 digest_0.6.12 withr_1.0.2 mime_0.5
[5] R6_2.2.0 jsonlite_1.4 xtable_1.8-2 git2r_0.18.0
[9] magrittr_1.5 httr_1.2.1 curl_2.5 devtools_1.12.0
[13] tools_3.3.1 htmlwidgets_0.8 yaml_2.1.14 httpuv_1.3.3
[17] base64enc_0.1-3 memoise_1.1.0 htmltools_0.3.5
Thanks for checking, I'll try to nail this down.
Finally I think I made a change that may address this, it took quite a while sorry.
The current version, or any version after commit 75c1b9200f3cd2a2a57f06b79e7d11f87318514c might help.
I checked again (after instaling the package from github), but the issue does not seem to be resolved. Not sure why firefox does not free the memory used by the old data. It is still a slightly outdated version of firefox 53.0 ( I guess I could re test after a system upgrade of ubuntu)