Skip to content

Optimize sample loader #218

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

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Optimize sample loader #218

merged 2 commits into from
Jan 8, 2025

Conversation

umputun
Copy link
Owner

@umputun umputun commented Jan 8, 2025

Continuation of optimization efforts started in #217

This one switches the tokenizer reader from channel-based to iterator-based. It also eliminates unnecessary ReloadSamples calls on sample's ham/spam add (write) activity.

The first part saves about 20% of the time spent in the samples loader, and the second one drops relatively heavy reloads from the places where we don't need to have them.

this is done by replacing chan-based fake iterator by modern (real) iterator
@umputun umputun merged commit 8f15d8f into master Jan 8, 2025
4 checks passed
@umputun umputun deleted the optimize-sample-loader branch January 8, 2025 19:01
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.

1 participant