-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ENH: Speed up reading of small buffers #12343
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
larsoner
requested review from
drammock,
agramfort,
dengemann and
mscheltienne
as code owners
January 9, 2024 20:09
drammock
reviewed
Jan 9, 2024
larsoner
commented
Jan 10, 2024
lines = show_fiff(str(bad_fname), output=list) | ||
last_line = lines[-1] | ||
assert ">>>>BAD" in last_line | ||
assert "302 = FIFF_EPOCH (734412b >f4)" in last_line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch on the order above @drammock, this line used to be:
302 = FIFF_EPOCH (734412b ?1073741828?) >>>>>>>>>>>>>>>>>>>>BAD'
which is wrong, now it's correct:
302 = FIFF_EPOCH (734412b >f4) >>>>>>>>>>>>>>>>>>>>BAD
drammock
approved these changes
Jan 10, 2024
snwnde
pushed a commit
to snwnde/mne-python
that referenced
this pull request
Mar 20, 2024
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #12234
@britta-wstnr at the end of the day I don't think the
numpy.dtype
I considered in #12234 will be tractable/worth it as:buffer_size_sec=1.
, then the I/O is no longer slowOkay with you to close the associated issue when this is merged?
In the meantime this PR cleans up and speeds up our tag code, on my system it:
pytest mne/io/fiff
from23.79s
to20.46s
Tag
logic and functions, especially involving when tofid.seek
to a new position in a file (it's explicit now rather than implicit)copy_tree
which is already in a private namespace (mne._fiff
) so no need to deprecate, can just removefid.tell
because this function was surprisingly a source of slowdowns in the single-sample buffer case