-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: Move all componentWillUnMount functionality to respective events #1544
Conversation
9a8ab2b
to
6ee52dc
Compare
6ee52dc
to
e70c5b1
Compare
awesome work @harshithpabbati ! we just need to make sure to debounce the more high-throughput events to avoid performance/render-blocking issues, as invoking lots of storage.set() events can sometimes lead to issues like that as for the delay, 500-1000ms should be fine. these values only need to be persisted in case the user navigates away or refreshes. this will essentially delay the write until the user has finished, or if there's lots of dragging or variables editing going on, it will only write to ls every 500ms-1000ms, rather than writing to localstorage 60 times a second or more |
@acao should I debounce the whole function ? |
9ba87c3
to
1bb1813
Compare
@harshithpabbati no, only the storage write events |
ok, I will update that |
if you debounce the setState() events, we get weird issues with resizing panes as you can see |
oh, yeah true 👍 |
@harshithpabbati why did you close this PR? |
That's because we found a better solution than this. |
@harshithpabbati i'm not sure that's the case, we just found a better way to reproduce the error. is there a conversation that i did't see where you and Mateo decided his solution was better? |
Oh is it ? Then cool! |
No, we didn't have any discussion |
@harshithpabbati yes, as i mentioned in discord, we will wait until both solutions are ready, and make sure we can reproduce the error with both and see if one doesn't solve it better than the other. both proposals are welcome. |
1bb1813
to
0ba34e0
Compare
Done updated @acao :) |
looking good @harshithpabbati ! as a rule of thumb, any event that has its events triggered many many times a second, such as resize or keyboard stroke, should debounce all the |
Sure, I will update it soon |
0ba34e0
to
99ac424
Compare
@acao is this PR helpful ? |
@harshithpabbati it might still be? |
lol oops! tried merging via UI, fixing it now. gonna try and see if this resolves our user's issue |
@harshithpabbati fixed it! merging soon |
Hope this solves the issue. It will and it should ofcourse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work! everything looks to be operating as it should be
…graphql#1544) Co-authored-by: Rikki Schulte <rikki.schulte@gmail.com>
Closes #1515
Move all functionality from
componentWillUnMount
lifecycle@acao can you review this PR