I can reproduce this with my Cragne Manor contribution code, but not in a new project, so it obviously (and unsurprisingly) is related to source code length.
This is Inform 1.68.1 on Big Sur 11.3.1 on a 2016 MacBook Pro (2,6 GHz Intel Core i7) with 16 GB RAM and Intel HD Graphics 530. Those of you who cannot see this, what are your specs?
EDIT: Another possibly unrelated IDE bug: Clicking the “Restore default settings” button makes Inform beachball indefinitely.
Towards the bottom of the visible trace, there’s a function labeled -[NSTextView(NSTextView_TouchBar_API) updateTextTouchBarItems], and then heaps more calls related to the touch bar that didn’t fit in the screenshot. Those calls (and indeed the slowdown, for the most part) aren’t happening on my desktop Mac.
So if @zarf was testing on a desktop Mac, or an older MacBook without a touch bar, that might explain why he didn’t experience any slowdown.
As for the underlying problem that causes this… I have no idea.
Good spotting! You are correct; I tried testing on my MPB (with touchbar) and it was very slow. On my desktop iMac it’s fast.
Actually, even with syntax coloring off, editing gets a bit slow with a large source file on the MPB. Not slow enough to impede work, but it’s slower than editing should be.
(I looked around for a large single-file I7 source file for everybody to test with, and came up with http://ifarchive.org/if-archive/games/source/inform/ZorkI7.zip . That’s old I7 code, so it doesn’t compile on 6M62, but it suffices to demonstrate the syntax-coloring problem.)
That should be fine. I’ll ~create a bug report~ update the existing bug report.
For what it’s worth, I think that the problem is not that the TouchBar call is taking forever. It’s that the whole “display layer” sequence is being called thousands of times per keystroke.
Thanks a lot!
I’m using a Mac with TBar, and the new release worked wonders!
The Dark mode fix is also great as I had already to re-install Inform a couple of times because the preferences fix wasn’t so stable.