Closed louga31 closed 2 years ago
Awesome, thanks. I've yet to set up any performance tests or analyze it rigorously, so if you find any other problem areas that you don't want to handle yourself, feel free make an issue for them and I'll take a look later on.
I should also probably make a formal contributing page, but the basic process is this:
tox
against Python 2.7 and 3.10 and ensure it passes (This runs the tests for both versions, I've already done this for this pull)coverage run
to check that code coverage is 100% (I've also verified this for this pull)0.9.7
)
I rewrote the _shift_key_indices function using dictionary comprehension, to make it run a lot faster (from 21 seconds down to 4.7 on a big blueprint). This function was responsible for more than 75% of the time spent. (Total time got from 47 seconds down to 14) This was especially true for big blueprints with many entities. I ran the test suite and coverage, and all 396 tests passed. (I left the old code commented to make it easier to understand, as it's more verbose)
Before:
After: