TextViewBenchmark
A suite of performance tests for macOS text views
Install / Use
/learn @ChimeHQ/TextViewBenchmarkREADME
TextViewBenchmark
A suite of performance tests for macOS text views
Every year, I check in on TextKit 2 to see how things are going. It was introduced in macOS 12, and I found it basically unusable. With macOS 13 it was better, but still rough. So far, on macOS 14, it seems like it might be ok! I was originally having some performance problems. So, I took some time to put together some automated performance tests.
Usage
The tests are automated using XCTest's UI performance testing system, backed by custom OSSignpost. I find this really wonderful for both repeatibility and Instruments usage.
If you want to set up your own view for testing, you can do something like this:
static func withScrollableTextView() -> TextViewController {
let scrollView = NSTextView.scrollableTextView()
let textView = scrollView.documentView as! NSTextView
return TextViewController(textView: textView, scrollView: scrollView)
}
Results
I'm using macOS 14 beta, so that may be a factor. Based on these tests, TextKit 1 is extremely fast and TextKit 2 actually even a small amount faster!
Contributing and Collaboration
I'd love to hear from you! Get in touch via an issue or pull request.
I prefer collaboration, and would love to find ways to work together if you have a similar project.
I prefer indentation with tabs for improved accessibility. But, I'd rather you use the system you want and make a PR than hesitate because of whitespace.
By participating in this project you agree to abide by the Contributor Code of Conduct.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
