Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group signals only once per Block #15

Open
achilleas-k opened this issue Jul 2, 2018 · 0 comments
Open

Group signals only once per Block #15

achilleas-k opened this issue Jul 2, 2018 · 0 comments

Comments

@achilleas-k
Copy link
Member

The _group_signals() method is called once per Group/Segment

dataarrays = self._group_signals(dataarrays)

and then a final time in each Block to find "groupless" signals:

blockdas = self._group_signals(nix_block.data_arrays)

It's not generally a slow process. There's a sorting going on in the method which is going to be removed soon (see NeuralEnsemble#545) and ignoring that, it's an O(N) function. Now, N is the number of signals first in a Group/Segment, and then for the whole Block, so all in all the entire reading process reads through the DataArrays twice. Since we're reading all the DataArrays in a Block anyway, we might as well collect them before descending into a Group and use a per-block collection/grouping of signals.

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

No branches or pull requests

1 participant