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

App-state: Remove unused indexCtr #1796

Merged
merged 2 commits into from
Dec 31, 2019
Merged

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Dec 23, 2019

In the earlier stages of the app we relied on counting index operations
to defer updating the internal note list. This was to prevent thrashing
in the app when receiving updates for an account with lots of notes.

In #89 we moved the indexCtr value out of the controlled app state and
turned it into an instance variable on the actionMap object. This
change was made because we couldn't wait for a Redux update cycle to
update that value - the instance property updated immediately and
imperatively.

In #987 we removed the index-counting operation entirely and instead
relied on a more natural debounce() on bucket.on('index'). This
removed the need for the work-around but didn't remove the indexCtr
property.

In this patch we're finally removing it to finish the work from #987.
The property is currently unused and unreferenced in the app.

Testing

There should be no functional or visual changes in this patch.

@dmsnell dmsnell requested a review from a team December 23, 2019 22:04
Copy link
Member

@codebykat codebykat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

As an aside, do we really need release notes for very minor code clean-up that doesn't create any user-facing changes? My instinct would have been to skip it but I don't know if we have a hard-and-fast rule about what changes "require" release notes. cc @bummytime

@dmsnell
Copy link
Member Author

dmsnell commented Dec 31, 2019

do we really need release notes for very minor code clean-up

My plan was to incorporate all of the random cleanups into this one line. We might need to do a PR to cleanup the release notes before the next release though.

In the earlier stages of the app we relied on counting index operations
to defer updating the internal note list. This was to prevent thrashing
in the app when receiving updates for an account with lots of notes.

In #89 we moved the `indexCtr` value out of the controlled app state and
turned it into an instance variable on the `actionMap` object. This
change was made because we couldn't wait for a Redux update cycle to
update that value - the instance property updated immediately and
imperatively.

In #987 we removed the index-counting operation entirely and instead
relied on a more natural `debounce()` on `bucket.on('index')`. This
removed the need for the work-around but didn't remove the `indexCtr`
property.

In this patch we're finally removing it to finish the work from #987.
The property is currently unused and unreferenced in the app.
@dmsnell dmsnell force-pushed the refactor/remove-unused-counter branch from 9ecd37d to d7e4ad3 Compare December 31, 2019 04:55
@dmsnell dmsnell merged commit af85d7b into develop Dec 31, 2019
@dmsnell dmsnell deleted the refactor/remove-unused-counter branch December 31, 2019 05:16
@codebykat codebykat added this to the 1.14 milestone Dec 23, 2020
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