<vespakoen>
Hey guys! I am trying to profile / debug the SolveSpace speed issue on macOS Catalina, and I am trying to make a build using XCode so I can get more details. (The CMake build is working perfectly fine by the way). However, when launching from XCode it is missing the resources folder, so I guess the custom cmake command that produces the
<vespakoen>
translations is not run. Did anyone already get Solvespace to run from XCode? Thought i'd ask first before going into this rabbithole
<whitequark>
I don't use XCode personally
f8l has quit [Remote host closed the connection]
f8l has joined #solvespace
sklv has quit [Ping timeout: 260 seconds]
sklv has joined #solvespace
ohsix has quit [Ping timeout: 240 seconds]
ohsix has joined #solvespace
<vespakoen>
in guimac, -drawRect, there is the RGB color space being used, I changed this to `CGColorSpaceRef colorspace = self.window.screen.colorSpace.CGColorSpace;` which uses the system default, preventing color conversions from happening (on every redraw), which seem to speed things up. There is also the possibility of setting "NSHighResolutionCapable"
<vespakoen>
to "False" in the Info.plist, which also speeds things up (but makes the UI more ugly). I'll be testing this some more and send a PR
<vespakoen>
For anyone else wanting to debug in XCode (not sure if this chat is archived, but anyways:) You can build the "BUIILD_ALL" target in XCode, then open the SolveSpace.app yourself and in XCode under Debug -> Attach to running process. I might have copied the resources folder from another place into the SolveSpace.app, although I am not sure about
<vespakoen>
this anymore (have removed the build folder a couple of times in between and lost track)
<whitequark>
well, NSHighResolutionCapable is set to true deliberately
<whitequark>
the colorspace change seems good
<whitequark>
the root cause is that for some reason macOS can't overlay its controls on top of a GL layer, requiring me to draw everything offscreen, which is very slow
ohsix_ has joined #solvespace
ohsix has quit [Read error: Connection reset by peer]
<vespakoen>
Ah I see =) yeah take my "measurements" with a grain of salt, apparently I have sometimes been testing it in a small window and sometimes in a big one, then thinking I have made some magical fix whereas in reality I just launched SolveSpace in a small part of my screen hehe
<vespakoen>
I saw the framebuffer approach =) perhaps someone is willing to do the OpenGL -> Metal port one day... I'll just keep using the app scaled down a bit I guess
<vespakoen>
Out of curiousity, what Cocoa controls you want to overlay on the GL Layers? just the context menu or are there other things you need it for?
f8l has quit [Ping timeout: 252 seconds]
f8l has joined #solvespace
f8l has quit [Ping timeout: 276 seconds]
f8l has joined #solvespace
f8l has quit [Ping timeout: 240 seconds]
f8l has joined #solvespace
vespakoen has quit [Remote host closed the connection]