Skip to content

Conversation

@schneems
Copy link
Collaborator

Previously we were accidentally not using the persisted @before_index and instead using the "original" before index. This commit fixes that problem and adds a test for the behavior.

Previously we were accidentally not using the persisted @before_index and instead using the "original" before index. This commit fixes that problem and adds a test for the behavior.
@schneems schneems force-pushed the schneems/fix-around-block-before-index branch from 289cb0c to ad8b2bd Compare January 20, 2022 02:14
When scanning returns nothing, the block position should not change.
This refactor removes the need to allocate an extra AroundBlockScan. Not a big hotspot, but it's not needed either.
Calling `send` and iterating over an array is not great. We're only dealing with 2 cases, we can explicitly handle both of them.
We're already skipping `hidden?` we don't need to call the method again.
Experimenting with this approach (not a hotspot).
@schneems schneems force-pushed the schneems/fix-around-block-before-index branch from 084bf6f to b579f5f Compare January 20, 2022 02:58
@schneems schneems merged commit 89c6882 into main Jan 20, 2022
@schneems schneems deleted the schneems/fix-around-block-before-index branch January 20, 2022 03:02
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.

2 participants