Closed shahronak47 closed 2 months ago
Checking the performance on DEV
branch vs fix-all-cache
branch
DEV branch performance
path1 <- "api/v1/pc-charts?country=all&year=all&povline=1.2&ppp_version=2017&fill_gaps=true"
path2 <- "api/v1/pip?country=all&year=all&povline=5&ppp_version=2017&fill_gaps=false"
tictoc::tic()
d <- httr::GET(local$root_url,
port = local$port,
path = path1) |>
httr::content(encoding = "UTF-8")
tictoc::toc()
61.26 sec elapsed
tictoc::tic()
d <- httr::GET(local$root_url,
port = local$port,
path = path2) |>
httr::content(encoding = "UTF-8")
tictoc::toc()
17.19 sec elapsed
fix-all-cache branch performance
tictoc::tic()
d <- httr::GET(local$root_url,
port = local$port,
path = path1) |>
httr::content(encoding = "UTF-8")
tictoc::toc()
58.28 sec elapsed
tictoc::tic()
d <- httr::GET(local$root_url,
port = local$port,
path = path2) |>
httr::content(encoding = "UTF-8")
tictoc::toc()
16.97 sec elapsed
This PR aims at removing
future
andpromises
dependencies and other code related to it.future
,promises
,future.callr
,future.apply
is_forked
function which checks if the calculation is intensive and uses future and promise for those calls./n-workers
and it's associated tests.