Skip to content

reading neurons from neuronlistfh objects is very slow #402

@jefferis

Description

@jefferis

There is a new behaviour in the latest version of R which interacts very badly with a piece of code that loads neurons from neuronlistfh objects. Basically it forces garbage collection after reading every single neuron. The relevant code in "[[.neuronlistfh" was always crufty. I'm not sure if the external problem (in filehash package) is now fixed.

I think the definition of showConnections must have changed in R >=3.6.0

> showConnections
function (all = FALSE) 
{
    gc()
    set <- getAllConnections()
    if (!all) 
        set <- set[set > 2L]
    ans <- matrix("", length(set), 7L)
    for (i in seq_along(set)) ans[i, ] <- unlist(summary.connection(set[i]))
    rownames(ans) <- set
    colnames(ans) <- c("description", "class", "mode", "text", 
        "isopen", "can read", "can write")
    if (!all) 
        ans[ans[, 5L] == "opened", , drop = FALSE]
    else ans[, , drop = FALSE]
}
<bytecode: 0x7fe0f1afef58>
<environment: namespace:base>

Metadata

Metadata

Assignees

No one assigned

    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