Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Experiments #180

Closed
wants to merge 3 commits into from
Closed

Experiments #180

wants to merge 3 commits into from

Conversation

stefanpenner
Copy link
Collaborator

@stefanpenner stefanpenner commented Dec 15, 2016

  • split into separate PR

  • micro-task for auto-runs (would be nice to factor to share \w RSVP?)
  • add note to where to deprecate nested runs
  • incremental Queue flush
  • Incremental flush across different mechanisms for a subset of queues (rAF/ micro-task), ala igniter

@stefanpenner
Copy link
Collaborator Author

stefanpenner commented Dec 15, 2016

Interesting popup blocker details when changing some flush types: #181

@kanongil
Copy link
Contributor

I was just debugging a sub 60-fps rendering issue, where I saw that the setTimeout(x, 0) delay can push my event callback deferOnce() logic past the start of the next frame, causing a frame drop.

I was about to suggest a micro-task approach instead, but it seems that you are already on this. 👍

@stefanpenner
Copy link
Collaborator Author

@kanongil so, if you are hitting setTimeout because of BB. It is most likely the result of something not being correctly wrapped in the run-loop. Although ^ will help quite a-bit, being able to perform work synchronously in the current task will tend to out-perform even micro-task. (There are some quirks with GC/JIT where they may not be true, but generally...)

@kanongil
Copy link
Contributor

@stefanpenner Ah, I had always assumed that Embers Ember.run.schedule(), etc created a run loop when needed (which it does, just not immediately). Thanks for the clarification.

Anyway, this still look interesting :-)

@stefanpenner
Copy link
Collaborator Author

stefanpenner commented Dec 19, 2016

@kanongil well, it will create a new one (with an autorun setTimeout for now) if not already in one. So using micro-task, will make that case much much better.

@stefanpenner
Copy link
Collaborator Author

plumbing for incremental stuff landed, and micro-task for auto-run is landing here: #306

@stefanpenner stefanpenner deleted the stuff branch January 18, 2018 20:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants