We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
libuv cost lot's of cpu.
why libuv cost lot's of cpu.
just an instance of tcp.
class Main { static function main() { var loop = hl.uv.Loop.getDefault(); var tcp = new hl.uv.Tcp(loop);//cost more than 50%~90% of single cpu } }
hl 1.12.0
The text was updated successfully, but these errors were encountered:
@ncannasse will you take a look?
Sorry, something went wrong.
I think this is by design, and definitely not HashLink related.
I think this happens because of the integration of libuv's default loop into Haxe's MainLoop:
loopEvent = haxe.MainLoop.add(function() { // if no more things to process, stop if (def.run(NoWait) == 0) { loopEvent.stop(); loopEvent = null; } });
https://github.com/HaxeFoundation/haxe/blob/fe23a92264be3853dddb03cf664595f2a07aa196/std/hl/uv/Loop.hx#L49-L55 Since tcp handler is alive, def.run(NoWait) immediately returns non-zero value. And then MainLoop immediately runs the next tick because loopEvent is not stopped. These PRs should address the issue: #464, HaxeFoundation/haxe#10342
def.run(NoWait)
loopEvent
No branches or pull requests
libuv cost lot's of cpu.
why libuv cost lot's of cpu.
just an instance of tcp.
hl 1.12.0
The text was updated successfully, but these errors were encountered: