Skip to content
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

Windows support #43

Closed
parro-it opened this issue Jul 18, 2016 · 5 comments
Closed

Windows support #43

parro-it opened this issue Jul 18, 2016 · 5 comments

Comments

@parro-it
Copy link
Owner

I just merged Windows branch into master.

From now on, libui-node support Windows OS too!

After many attempts using various methods, I finally implemented the event loop using a simple libuv timer.

Linux and macOS got a better event loop implementation, with a background blocking thread that check for any pending GUI event and when there are one or more, it run a callback in main js thread that dispatch all events.

It appear that on Windows we have no way to check for the presence of pending events on other threads, so I revert to checking them in main thread, once every 100 ms.

Anyway, CPU usage appear to be lower than 1% on my machine. So at least by now, I choose to go on with this implementation. Maybe we can find a better way in future.

Please test it and report any issue you'll find, thanks!

@tracker1
Copy link

You should run updates every 16ms to hit 60fps...

@PaulBGD
Copy link

PaulBGD commented Jul 19, 2016

Or rather, run them to match the screen's refresh rate.

@PaulBGD
Copy link

PaulBGD commented Jul 19, 2016

Yeah after running the examples, you can definitely feel the lag on a 60hz monitor. I can't imagine how a 144hz monitor would feel.

@parro-it
Copy link
Owner Author

Ok, thank you, I will shorten the timeout to 16ms.

@parro-it
Copy link
Owner Author

Event loop is completely implemented on 0.1.0 and should be more performant on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants