66

iTerm2's new drawing engine uses Metal 2

 5 years ago
source link: https://www.tuicool.com/articles/hit/7ne2qqi
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

iTerm2 has a new drawing engine that uses Metal 2. For many users, this will significantly improve performance.

Benefits

cat

Availability

The Metal renderer is in the nightly builds and iTerm2 3.2beta1 and later.

The new renderer is not available for some configurations:

  1. You must have macOS 10.12 or later.
  2. Transparent windows are not supported. They must be opaque. This is because subpixel anti-aliasing becomes too complex.
  3. You must disable ligatures for both ASCII and non-ASCII fonts in Prefs > Profiles > Text . Ligatures are very hard to support in a GPU-based renderer.
  4. If you have adjusted Prefs > Advanced > Height of top and bottom margins in terminal panes to be less than 2, the Metal renderer will not be used.
  5. Vertical spacing for your fonts (as configured in the font panel) must not be set to less than 100% (the default).

It is also temporarily disabled under certain conditions:

  1. When another view, such as the find bar, is drawn overtop the terminal.
  2. When your device is not plugged into a charger. This is controlled by Prefs > Advanced > Disable Metal renderer when not connected to power .

Troubleshooting

You can disable it in Prefs > General > GPU Rendering .

The easiest way to verify that it's working is to enable the FPS Meter ( Prefs > Advanced > Show FPS meter ). When the Metal renderer is in use it shows the current frame rate in magenta text in the top right of the session.

How to report performance issues

  1. Create a new issue at https://iterm2.com/bugs , if needed
  2. Make sure this is on: Prefs > Advanced > Log stats about text drawing performance to console .
  3. Create a new window
  4. Scroll through a big file or whatever it is that's slow
  5. Select iTerm2 > Copy Performance Stats
  6. Paste into the issue report (cmd-V)

Note that recorded stats are erased when iTerm2 becomes active, so the only drawing that's timed is between when iTerm2 became active and when you copied the stats out.

How to report drawing problems

  1. Make the session that's drawing wrong is active (i.e., it would receive keyboard input)
  2. Select iTerm2 > Capture Metal Frame (it will be enabled if Metal is in use)
  3. Wait a few seconds
  4. File a bug at https://iterm2.com/bugs and attach /tmp/iTerm2-frame-capture.zip .

Please let me know if you have any problems.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK