Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library(qgis) #32

Closed
florisvdh opened this issue Feb 15, 2023 · 2 comments
Closed

library(qgis) #32

florisvdh opened this issue Feb 15, 2023 · 2 comments

Comments

@florisvdh
Copy link
Contributor

Hi Jan,
I saw in README 'The package is not meant to be load directly as this would significant number of functions (<900).'. Actually I don't think that's a problem on modern systems. Loading time is still mainly taken by loading qgisprocess in the background.

So I think it's no problem to do library(qgis):

> system.time(library(qgisprocess))
Attempting to load the cache ... Success!
QGIS version: 3.28.3-Firenze
Having access to 785 algorithms from 9 QGIS processing providers.
Run `qgis_configure(use_cached_data = TRUE)` to reload cache and get more details.
   user  system elapsed 
  2.241   0.219   2.653 

# New R session

> system.time(library(qgis))
Attempting to load the cache ... Success!
   user  system elapsed 
  2.218   0.267   2.675 
> ?qgis_ruggednessindex
starting httpd help server ... done
@florisvdh
Copy link
Contributor Author

florisvdh commented Feb 15, 2023

Also the extra occupied memory can be ignored relative to qgisprocess:

> lobstr::mem_used()
31.09 MB
>
> library(qgisprocess)
Attempting to load the cache ... Success!
QGIS version: 3.28.3-Firenze
Having access to 785 algorithms from 9 QGIS processing providers.
Run `qgis_configure(use_cached_data = TRUE)` to reload cache and get more details.
> 
> lobstr::mem_used()
43.03 MB
> 
> library(qgis)
> 
> lobstr::mem_used()
44.16 MB

# New R session


> lobstr::mem_used()
30.60 MB
> 
> library(qgis)
Attempting to load the cache ... Success!
> 
> lobstr::mem_used()
43.52 MB

@JanCaha
Copy link
Owner

JanCaha commented Feb 15, 2023

Ok, thanks for the tests. I just though that the loading the package will take more resources with respect to its size ;-) I will remove the text from the readme.

@JanCaha JanCaha closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants