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

Performance problems with large insertions #9

Open
martijnvermaat opened this issue May 31, 2015 · 0 comments
Open

Performance problems with large insertions #9

martijnvermaat opened this issue May 31, 2015 · 0 comments

Comments

@martijnvermaat
Copy link
Contributor

As you can see, comparing AAAA... with A is instant, but comparing A with AAAA... takes a lot of time:

In [5]: %timeit extractor.describe_dna('A' * 10000, 'A')
10000 loops, best of 3: 129 µs per loop

In [6]: %timeit extractor.describe_dna('A', 'A' * 10000)
1 loops, best of 3: 1.13 s per loop

Perhaps more importantly, memory usage also sky rockets. I couldn't run this test with a 50 Kbp sample sequence on a machine with 4G memory, completely freezing my machine for half a minute. I would like to prevent this from happening on the server.

I didn't look into this further, but I suspect it tries to find the inserted sequence in the original sequence, which of course is not possible. Could this be an easy case to optimize?

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