-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rewrite to use actual async_hooks #17
Comments
Yes!, was thinking about this too. I have previously discovered a few bugs in
Not quite sure how #16 is related to this. It sounds like you want to create a graph rather than a tree. |
@AndreasMadsen sorry, my knowledge of data structures is not the best. Let's put it this way: Handles with the same ID should display on the same line in the visualizer even if they are triggered from different points. Now, that may not make 100% sense at the current time but I'm not sure how else to display timers is a conceptual and technically correct way. That is, if you take the same timer object, do an |
Ah, okay. That should be fine. Though the idea of uids popping back into existence is a little confusion and perhaps dangerous. |
I think my understanding of the node.js timer implementation is vastly insufficient to understand how a timer can be updated without becoming a different timer. In normal JS I would write In any case it does complicate things quite a bit, because a single handle will have multiple parents (no longer a tree). However because there is still a parent-child relationship, it should be possible to visualize it like it's done now, see Topological Sorting of a DAG. |
I suppose this depends on the definition of "timer". Timers are not restricted to being That being said, in any timers implementation, changing the timeout duration or timeout start means re-ordering the timer in an underlying queue. In our case, due to optimizations, changing the duration may cause a new underlying TimerWrap to be created. Changing the timeout start will not. ... etc Perhaps it really does only make sense to fire init/destroy once for these. Not 100% sure yet. |
Thus, adding to the confusion, the timer in the above picture is really a |
Maybe just using the same UID without firing events for re-insertion before (handle is orange and UID 12.) |
Thanks for the work, I've landed |
See nodejs/node#8531
I've already started on this and got it working, but there are some relational challenges with timers and some underlying resources such as the HTTP parser.
I'll probably need to fix #16 in the process and use a flat data file by UID, and convert some of the render ordering to use that. (To deal with re-used timers...)
The text was updated successfully, but these errors were encountered: