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

Dump Read Slow #24

Open
suragnair opened this issue Jan 26, 2020 · 0 comments
Open

Dump Read Slow #24

suragnair opened this issue Jan 26, 2020 · 0 comments

Comments

@suragnair
Copy link

When few barcodes are provided in barcode_file, the function is very slow since it populates barcode_dict_ref with all barcodes, even those not in barcode_file.

barcode_dict_ref = getBarcodesFromSnap(snap_file);

This can simply be improved by writing another function that also takes the barcode_list as input and only adds to dict if it is present in the barcode_list.

for item in f["BD/name"]:
item = item.decode();
barcode_dict[item] = qc();

By doing this I receive almost 20x speedups for loading the barcode_dict_ref.

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