Skip to content

Conversation

@hvangeffen
Copy link
Collaborator

No description provided.

@hvangeffen hvangeffen linked an issue Dec 15, 2023 that may be closed by this pull request
@hvangeffen hvangeffen changed the title Allow sections to be created more efficiently in a loop 87 allsec is slow Dec 15, 2023
else
% Valid section: append.
all_sections{end+1} = neuron.Section(section, owner);
all_sections{end+1} = neuron.Section(section, owner, all_sections{1}.mech_list, all_sections{1}.range_list, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no intuitiion for wy the new section object would be copying information from the 1st section?

Copy link
Collaborator Author

@hvangeffen hvangeffen Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the reason allsec is slow is partly due to every section getting all neuron functions and splitting them into mech list and range list:
image

This PR adds two params to the Section constructor to pass these values if they should not be calculated again.

These values should not be persistent as these functions can dynamically change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allsec is slow

3 participants