Skip to content

Improve Netzschleuder code #38

Closed

Description

@krlmlr

Activity

  1. schochastics commented on Apr 29, 2025

    @schochastics
    Contributor

    @krlmlr What is the advantage of resp_stream_raw()? Should this replace the current logic of checking filesize beforehand and only download if it doesn't go over a certain limit?

    byte_size <- as.numeric(httr2::resp_headers(resp)[["content-length"]])
    gb_size <- round(byte_size / 1024^3, 4)
    if (gb_size > size_limit) {
    cli::cli_abort(c(
    "{zip_url} has a size of {gb_size} GB and exceeds the size limit of {size_limit} GB.",
    "i" = "To download the file, set {.arg size_limit} to a value greater than {gb_size}"
    ))
    }

  2. krlmlr commented on Apr 29, 2025

    @krlmlr
    ContributorAuthor

    We can read in chunks of 1 MB or so, and are no longer limited regarding file size. The current code loads the entire file into RAM. I suspect this will also help with rate limiting, need to check.

    Thinking about it, we need RAM proportional to the graph size anyway, so perhaps not important?

  3. github-actions commented on Jul 23, 2026

    @github-actions

    This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

  4. locked and limited conversation to collaborators on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions