-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
High CPU load on Darwin (Crystal 0.7.2) #706
Comments
Same issue here with the simple http server code. 100% cpu loading IN OBSCURO MIRANDA RELUCENT
|
Seems it has something to do with the change to STDOUT (and others) from CFileIO to FileDescriptorIO and non-blocking IO for that. Not sure yet why it's happening. |
The problem is that libevent is raising the "write" event for the STDOUT all the time, even though the event is registered with the ET (edge triggered) flag: https://github.com/manastech/crystal/blob/master/src/concurrent/scheduler.cr#L24 I'll investigate this further to find a solution. Thanks for reporting! |
In IRC @jhass confirmed this doesn't happen in linux, so maybe it's a bug in libevent for mac, but we'll have to investigate. |
The solution could be more elegant... but it works for now. @Nightforge, @tommasop could you confirm if this fixes the issue? |
Confirmed! |
1 similar comment
Confirmed! |
Hello!
Issue with crystal compiler 0.7.2 on OS X - high CPU load
Test code is:
I test the same code on os x with 0.7.1 - has no issues. Crystal compiler for linux (0.7.1 and 0.7.2) also has no this issue.
The text was updated successfully, but these errors were encountered: