Giter Club home page Giter Club logo

Comments (5)

Robinlovelace avatar Robinlovelace commented on June 26, 2024

Just to add: it's hard/impossible to open it up on a smartphone. I suspect the size of the network is a cause. No comments on the memory eating... To clarify, are you talking about memory eating on the client side? I imagine so based on the logs from the Firefox web client.

from upthat.

mpadge avatar mpadge commented on June 26, 2024

Yeah, deck.gl doesn't deliver well on mobile devices, but hey, not delivering well is still miles better than leaflet & co, which don't deliver at all

from upthat.

mpadge avatar mpadge commented on June 26, 2024

@SymbolixAU I tried with latest dev of all packages (mapdeck, spatialwidget, colouorvalues, jsonify), but the whole thing failed. Downgraded to CRAN mapdeck (0.2.1) then worked again, but it still eats memory. Note that its not a leak, it is clearly just that something - deck.gl? - is holding all the vector data from each click in memory, so memory usage aggregates with each successive click of toggle.

from upthat.

 avatar commented on June 26, 2024

I've run this a few times and I can't say I'm seeing the issue you're describing. How many times do you toggle between cities before you notice it slow down?

One thing I have found is in the Kathmandu data, row 24869 has a LINESTRING with two coordinates, both of which appear to be the same. Deck.gl errors when it finds this.

options( digits = 8 )
> unclass( net[ 24869, ]$geometry[[1]] )
          [,1]      [,2]
[1,] 85.342642 27.751105
[2,] 85.342642 27.751105

And, you don't need to call clear_path() if you're overwriting the same layer (layer_id) with new data; deck.gl will handle that for you.

I'm also using the latest dev versions of all my packages, and using Chrome

devtools::session_info("mapdeck")
─ Session info ─────────
 setting  value                       
 version  R version 3.6.0 (2019-04-26)
 os       macOS Mojave 10.14.5        
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_AU.UTF-8                 
 ctype    en_AU.UTF-8                 
 tz       Australia/Melbourne         
 date     2019-07-29Packages ────────────
 ! package         * version    date       lib source                                   
   BH                1.69.0-1   2019-01-07 [1] CRAN (R 3.6.0)                           
   colourvalues      0.3.0      2019-07-04 [1] Github (SymbolixAU/colourvalues@074fc54) 
   crayon            1.3.4      2017-09-16 [1] CRAN (R 3.6.0)                           
   curl              4.0        2019-07-22 [1] CRAN (R 3.6.0)                           
   digest            0.6.20     2019-07-04 [1] CRAN (R 3.6.0)                           
   geojsonsf         1.3.2      2019-04-28 [1] Github (SymbolixAU/geojsonsf@94eb225)    
   googlePolylines   0.7.2      2018-11-23 [1] CRAN (R 3.6.0)                           
   htmltools         0.3.6      2017-04-28 [1] CRAN (R 3.6.0)                           
   htmlwidgets       1.3        2018-09-30 [1] CRAN (R 3.6.0)                           
   httpuv            1.5.1      2019-04-05 [1] CRAN (R 3.6.0)                           
   jsonify           0.2.10002  2019-07-24 [1] Github (SymbolixAU/jsonify@1313e23)      
   jsonlite          1.6        2018-12-07 [1] CRAN (R 3.6.0)                           
   later             0.8.0      2019-02-11 [1] CRAN (R 3.6.0)                           
   magrittr          1.5        2014-11-22 [1] CRAN (R 3.6.0)                           
   mapdeck         * 0.2.1006   2019-07-28 [1] local                                    
   mime              0.7        2019-06-11 [1] CRAN (R 3.6.0)                           
   promises          1.0.1      2018-04-13 [1] CRAN (R 3.6.0)                           
   R6                2.4.0      2019-02-14 [1] CRAN (R 3.6.0)                           
   rapidjsonr        1.1        2018-09-22 [1] CRAN (R 3.6.0)                           
 V Rcpp              1.0.1      2019-07-25 [1] CRAN (R 3.6.0)                           
   rlang             0.4.0.9000 2019-07-09 [1] Github (r-lib/rlang@a3d7e47)             
   shiny           * 1.3.2      2019-04-22 [1] CRAN (R 3.6.0)                           
   sourcetools       0.1.7      2018-04-25 [1] CRAN (R 3.6.0)                           
   spatialwidget     0.2.1006   2019-07-24 [1] Github (SymbolixAU/spatialwidget@dbe2449)
   xtable            1.8-4      2019-04-21 [1] CRAN (R 3.6.0)                           
   yaml              2.2.0      2018-07-25 [1] CRAN (R 3.6.0)

from upthat.

mpadge avatar mpadge commented on June 26, 2024

Thanks @SymbolixAU. Here's some latest attempts from my side, toggling around half a dozen times in between each memory profile. Chrome:
Screenshot from 2019-07-29 09-23-23
And firefox:
Screenshot from 2019-07-29 09-26-59

All actually looks okay now, so happy to close. I'll remove the clear_path, which I just inserted in an attempt to possibly improve things - thanks.

Note also that I don't get any error with that linestring, possibly because:

duplicated(as.matrix(net$geometry[[24869]]))
#> FALSE FALSE

The values aren't identical. Thanks for looking into this - much appreciated!

from upthat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.