Skip to content

Replace furrr with mirai for parallel execution #77

@NewGraphEnvironment

Description

@NewGraphEnvironment

Replace furrr with mirai for parallel execution

Problem

furrr/future creates heavyweight worker processes per future_map() call. Workers are ephemeral — no connection reuse, serialization overhead. Each worker must call frs_db_conn() independently and relies on PG_*_SHARE env vars.

Proposed Solution

Switch to mirai for parallel map in frs_habitat(). mirai provides:

Scope

  • Replace ~20 lines of furrr/future code in R/frs_habitat.R
  • Update DESCRIPTION: remove furrr/future from Suggests, add mirai
  • Pass DB connection params to workers (not env-var dependent)
  • Two parallel sections: Phase 1 (partition prep) and Phase 2 (species classification)

Relates to

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions