Thanks a lot, I'll look into haxeui-openfl backend and try to optimise what I can.
But still, I just tested that same exact code without modifications on Win 10 in VM on my Mac and application takes about 40% CPU in VM on Windows. In other words, I'm getting more than two times better performance on Win in virtual machine (1 core, 2GB RAM), than in macOS as normal os on the same computer (2 cores, 8GB RAM), which I just refuse to accept Are you sure that default compiler settings are same on both platforms in these matters, or that something isn't done differently on macOS, which could affects this?
In this test case, I use project generated by OpenFl (without modifications in terms of compiler flags), Haxe code is same on both platforms (as in previous post):
<?xml version="1.0" encoding="utf-8"?>
<meta title="Test" package="com.sample.test" version="1.0.0" company="Company Name" />
<app main="Main" path="Export" file="Test" />
<source path="Source" />
<haxelib name="openfl" />
<assets path="Assets" rename="assets" />
and compiling with
openfl test mac
openfl test windows
EDIT: I just tested it on same machine on Win 7 in VM (Win 10 alone runs slowly in VirtualBox, Win 7 is better), so on Win 7 in VM it's around 15% CPU (2 cores, 2 GB RAM while macOS running under it) as opposed to 100% CPU (2 cores, 8 GB RAM) on macOS. So I note that something is very wrong here. I have MBP 13 early 2011 and running Sierra, if that helps. I'll later test on MBP 13 mid 2012 just in case.