# Rendering / Refresh Slows Down Significantly when Plugin is Active

**URL:** <https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209>\
**Category:** Scripting\
**Tags:** bug\
**Created:** [June 3, 2021, 3:40am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209 "2021-06-03T03:40:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![oneweioranother](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/oneweioranother/32/273_2.png) [@oneweioranother](https://forum.glyphsapp.com/u/oneweioranother)\
**Post date:** [June 3, 2021, 3:40am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/1 "2021-06-03T03:40:56Z")

</div>

3.0.3 (3086)  
**Edit:** Originally I was testing only my plugin but I realised if I have even the original ShowCrosshair on, my rendering and refresh in the edit view gets extremely choppy. Is there some setting I can change? I’m using a 2017 MBP and do not experience these issues in G2.

**Original Post:** My plugin [ShowCrosshairOnSelect](https://github.com/weiweihuanghuang/ShowCrosshairOnSelect) which is based on [ShowCrosshair](https://github.com/mekkablue/ShowCrosshair) by @mekkablue significantly slows down rendering when it’s active. Is there something I’m doing that’s inefficient? I’ve tested it with no other plugins active and only my plugin active – it’s most noticeable when I’m panning with the hand tool, the refresh gets quite choppy.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [June 3, 2021, 6:42am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/2 "2021-06-03T06:42:26Z")

</div>

That is a problem with the python runtime. There is a significant overhead just calling a python method from ObjectiveC. I’m in contact with the pyobjc def. but it might take a while.

(Ronald is working on this right now: [Optimise calling machinery · Issue #359 · ronaldoussoren/pyobjc · GitHub](https://github.com/ronaldoussoren/pyobjc/issues/359))

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [June 3, 2021, 7:44am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/3 "2021-06-03T07:44:00Z")

</div>

I just tried and for me, the ShowCrosshair plugin from Rainer doesn’t seem to have an impact on the performance. I get nice 60 fps with the tool active.

What version of python do you use?

---

<div class="post-metadata">

**Author:** ![oneweioranother](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/oneweioranother/32/273_2.png) [@oneweioranother](https://forum.glyphsapp.com/u/oneweioranother)\
**Post date:** [June 3, 2021, 12:17pm UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/4 "2021-06-03T12:17:22Z")

</div>

Hmm I see… I’m on 3.9.1. Glyphs version. How can I check my FPS – this is much worse when I have a monitor plugged in – it’s not too bad on my laptop.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [June 3, 2021, 12:27pm UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/5 "2021-06-03T12:27:30Z")

</div>

Do you have an apple developer account. Then you could download the Quartz Debug tool from [developer.apple.com](http://developer.apple.com)  
Or use the Frames per second plugin.

---

<div class="post-metadata">

**Author:** ![oneweioranother](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/oneweioranother/32/273_2.png) [@oneweioranother](https://forum.glyphsapp.com/u/oneweioranother)\
**Post date:** [June 4, 2021, 12:28am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/6 "2021-06-04T00:28:24Z")

</div>

I installed Quartz Debug, my frame rate drops from 60fps to 30fps actually.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [June 11, 2021, 8:29am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/7 "2021-06-11T08:29:11Z")

</div>

Can you try installing only that single plugin?  
And what version of MacOS do you use?

---

<div class="post-metadata">

**Author:** ![oneweioranother](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/oneweioranother/32/273_2.png) [@oneweioranother](https://forum.glyphsapp.com/u/oneweioranother)\
**Post date:** [June 15, 2021, 3:33am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/8 "2021-06-15T03:33:12Z")

</div>

Catalina 10.15.7 (19H1217)  
[Correction]  
I tried only having the one plugin which was causing the frame rate drop installed, I still experienced the very obvious drop in framerate.

If I only have one glyph in the text tab I don’t have this issue. If I have a text tab with ~250 characters, then I have the issue to an extreme degree. At that point I can’t work in the text tab if I have _any_ plugins enabled.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [June 15, 2021, 3:55pm UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/9 "2021-06-15T15:55:16Z")

</div>

I found some issues that I could fix. It still slows down a bit but it is still useable.

---

<div class="post-metadata">

**Author:** ![oneweioranother](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/oneweioranother/32/273_2.png) [@oneweioranother](https://forum.glyphsapp.com/u/oneweioranother)\
**Post date:** [June 16, 2021, 5:16am UTC](https://forum.glyphsapp.com/t/rendering-refresh-slows-down-significantly-when-plugin-is-active/19209/10 "2021-06-16T05:16:22Z")

</div>

Thank you Georg, I’ve noticed it’s improved
