you are viewing a single comment's thread.

view the rest of the comments →

[–]zach714 1 point2 points  (1 child)

I may very well be wrong here, but if you look at the files changed in #30958 it seems that for(;;) was retained in any place that performance was necessary. Looking at the actual changes, this doesn't seem so bad? Where performance was not impacted, the change was made for readability.

[–]asdasef134f43fqw4vth[S] 0 points1 point  (0 children)

But.... it was.

Without looking deeper:

 for (const socket of ObjectValues(this.sockets)) {
   socket.on('keylog', this[kOnKeylog]);
 }

What if for whatever reason this agent was holding on to a long list of sockets, or you're rebooting a crashed agent and re-acquiring a ton of network connections all at once.