Hi! Lately Glyphs 2 started getting veeery slow with any reporter plugin on (even if it does nothing) and longer texts in a tab. The lag seems to depend on the length of text, but it doesn’t make sense if the plugin doesn’t do anything or reports something in one layer.
I have a reporter plugin helping with kerning, and I’m pretty sure I used it fine some time ago with long-ish word lists and now it’s a nightmare. Also the same plugins in Glyphs 3 do add some lag, but it’s way more reasonable and clearly dependent on calculations.
Any chance you could have a look?
Glyphs 2.6.10 (same with the previous), MacOS 12.6.1
That might have to do with the new version of python and pyobjc. I can’t really do something about that. Can you send me the plugin, maybe I find some time to debug this.
Is this a Apple Silicon or Intel mac?
For me it’s any non-default / user-installed reporter plugin (those which show up in the View menu in the last section, after Show Master Compatibility), Show Vertical Metrics for example.
At the same time no problems with other types of plugins, I just transferred my kerning helper to a General Plugin and it flies; seems like Tool and Palette plugins work as they used to as well, so I wonder what makes Reporter different.
I’m on M1
It you could send me both versions of your plugin, I might be able to find the difference.
What I found while narrowing it down is that turning the plugin on with
self.menuName makes reporter slow, whereas using
Glyphs.menu[VIEW_MENU].append( newMenuItem ) works fast. So I guess it’s not the type of plugin, but whatever
The difference gets pretty obvious with about 170+ layers in the tab.
Plugin Tests.zip (28.1 KB)
The general plugin is indeed not doing anything. Has nothing to do with the menu.
The reporter on the other hand is asked on several occasions if it likes to draw stuff. Have a look at the ReporterProtokol: GlyphsReporter Protocol Reference
And for some reason, that is very slow in Python2 now. In Glyphs 3 I added some optimizations to circumvent this but I can’t do that for Glyphs 2 any more.
And 170 laters is still quite a bit. I would recommend to use 20 or so. You can use the Sample text dialog (Cmd+Option+F) to quickly switch between texts.