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

Better G3Reader.tell() method #172

Closed
wants to merge 2 commits into from
Closed

Better G3Reader.tell() method #172

wants to merge 2 commits into from

Conversation

arahlin
Copy link
Member

@arahlin arahlin commented Jan 23, 2025

Implement a byte counter as a boost istream filter to avoid buffering in the kernel. This should speed up read IO for frame indexing.

@arahlin arahlin self-assigned this Jan 23, 2025
Implement a byte counter as a boost istream filter to avoid buffering in the
kernel.  This should speed up read IO for frame indexing.
G3Reader(std::vector<std::string> filenames, int n_frames_to_read = -1,
float timeout = -1., bool track_filename = false,
size_t buffersize = 1024*1024);
size_t buffersize = 1024*1024, bool counter = false);
Copy link
Member

@nwhitehorn nwhitehorn Jan 23, 2025

Choose a reason for hiding this comment

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

Does counter = true cause a measurable performance drop? Or can we just make it always be on, the way it is for the writer?

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't tried. Maybe @mhasself or @tskisner can test this out for their use case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Testing actually indicates that this counter introduces a measurable performance drop, so we may need a different approach here.

@arahlin arahlin closed this Mar 13, 2025
@arahlin arahlin deleted the istream_counter branch March 13, 2025 17:56
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.

2 participants