-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Batch iterator buffering to reduce number of timeout calls #7544
Conversation
🦋 Changeset detectedLatest commit: 7214b1b The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!bench |
PR BenchmarkMemory
Render
Server stress
Main BenchmarkMemory
Render
Server stress
|
I ran the same benchmarks against my own PR which added the To me this looks good. Might be worth pushing soon, to catch the next release to revert the performance regression. |
I think this PR is in a ready state as the benchmark are sort-of the test, and it does show a big perf improvement! Rendering |
It had to get worse to get better, but it might be a nice performance improvement. Once it’s actually released I’ll compare with my massive page that caused the issues. |
Thanks for the feedback everybody, I'd like to have a proper test that everything works as expected, but I didn't find a good solution to spy on I also threw in a couple of good ol' |
Yeah, I had like 3k components which triggered over 10k, not sure how, why or when. I traced it to that function, but actually counting them was hard. To me a reduction sounds good, as long as the actual rendering works correctly, like it should.
What are you worried about not working? |
I mostly wanted to verify that the batching is in fact happening and make this expectation explicit with a test, so future changes won't break it (as it's kind of implicit at the moment). So if everybody is OK with it we can merge it for now, and try adding some regression tests in a follow-up PR. |
Fine by me, I feel like at the very least resolving the perf regression is a nice thing. This should bring performance even higher than it was. Testing wise I’d have to think about it. |
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.
I'm still a bit worried having a timing-based test on this. When we added the parallel rendering timing tests, it became flaky now and then that we had to bump the timeout. But if you can figure out a way that doesn't cause flakiness, that would be great!
Changes
This batches iterator buffering to solve Over 10k
setTimeout()
on Route Rendering #7460Testing
Difficult due to inability to count the number of cals to
setTimeout
. Will be tackled in a different PR.Docs
Changeset is included