Closed sneakers-the-rat closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 63.45%. Comparing base (
37297a8
) to head (d0df01b
). Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
running into this again, and in case we were holding off bc the X is red, this was before we fixed the upstream tests (but i still can't trigger them, so manually trigger to check and we can get things a lil faster for free :)
edit: just rebased and now the check is green, but i would still want to see an upstream test before we merge to be sure :)
Here's a fun one:
How come ~1/4 of the time in
induced_slot
is spent onSchemaView.__hash__
?In my tests generating the NWB schema, the
__hash__
method is called 1612428 times, that's a lot! by comparisoninduced_slot
is only called 3004 times in these tests.How come
__hash__
gets called so many times, or i guess a better question is why is it called at all? Turns out it's called every time a method wrapped withlru_cache
is called - sinceself
is an argument to a method, andlru_cache
uses the hashes of the arguments to match cached results, it has to hashSchemaView
every time, but the value is always the same (except whenmodified
is incremented).So this PR just stores the value of the hash and returns that, invalidating when
modified
is incremented. ezpz