Skip to content

Slow DumpLayerConnections() #3142

@xavierotazuGDS

Description

@xavierotazuGDS

Is your feature request related to a problem? Please describe.
Execution of DumpLayerConnections() is probably too slow (see code below).

Describe alternatives you've considered
Given the present implementation of DumpLayerConnections(), a solution would be to profile the implementation and improve speed.

Another possible solution (in addition to the previous one) could be to add another version of DumpLayerConnections() that accepts a collection of connections as input parameter. Something similar to:

my_conn = nest.GetConnections(layer1, layer2, ...)
nest.DumpConnections(my_conn)

Additional context
The following code takes 1m20s to execute with NEST 3.6 (git master head from february 12th) Python 3.8.12, RockyLinux 8.5

import nest

pos = nest.spatial.grid(shape = [100,100] )

input_l = nest.Create('iaf_psc_alpha', positions=pos)
layer_0 = nest.Create('iaf_psc_alpha', positions=pos)

conn_neur = {'rule':'pairwise_bernoulli', 'mask': {'grid':{'shape':[10,10]}} }
syn_0 = {'synapse_model': 'static_synapse'}

nest.Connect(input_l, layer_0, conn_neur, syn_0)

nest.DumpLayerConnections(input_l, layer_0, 'static_synapse', 'conn.txt')

Metadata

Metadata

Assignees

No one assigned

    Labels

    I: No breaking changePreviously written code will work as before, no one should note anything changing (aside the fix)S: NormalHandle this with default priorityT: EnhancementNew functionality, model or documentationstaleAutomatic marker for inactivity, please have another look here

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions