DEV Community

Cover image for My Notes App Idles at 0% CPU
Anik Chand
Anik Chand

Posted on Edited on AI-assisted

My Notes App Idles at 0% CPU

Goodnotes is about 760 MB. Notability is about 420 MB. Most of them want an account, a subscription, or an iPad.

dot! is 25 MB, free, works fully offline, and idles at 0.0% CPU. I built it in Go because I was tired of fighting my notes app.

The dot! editor: rainbow handwriting, the main menu and page setup

The app I loved, and the toolbar I didn't

I take every note with a pen, in Xournal++. It's an honest, open-source app: good pen pressure, PDF annotation, open files. But every day it made me pay small taxes:

  • three clicks through tiny icons for things that should take one;
  • no filled shapes, no bendable arrows, no text inside a box, the way Excalidraw spoiled me;
  • no cropping a pasted screenshot, no handwriting fonts;
  • no home page, just a file dialog.

So I kept everything good about it and rebuilt the rest. That became dot!: a handwriting notebook for macOS, Windows and Linux. It reads and writes Xournal++ files, so you can switch back any time.

It opens a 58-page, 17,000-stroke notebook in 1.1 s (Xournal++ takes 3.5 s), with no Electron and no web view. Getting there meant patching my GUI toolkit's GPU renderer, and that's the fun part of this post.

What dot! does

dot! is a full-screen page with one floating tool dock, and a Home page that shows all your notebooks as cards.

Ink that feels like a pen. Real stylus pressure on macOS and Windows, and nine pen types: fountain, ballpoint, brush, calligraphy, fineliner, marker, a speed-sensitive signature pen, rainbow and glitter. Strokes are smoothed into curves while you write.

The pen panel: nine pen types with real nib previews, colours, line styles and feel

Real notes, not just doodles. This is from my own lecture notes: tables, highlighter and working, all by hand.

Handwritten notes in dot!: tables, highlights and working

Everything else in the box:

  • Diagrams, Excalidraw-style. 11 shapes, fills, bendable arrows, text inside boxes, and connectors that stick to boxes and follow them. Draw a rough shape and hold still: it snaps to a clean one.
  • Annotate any PDF. The export keeps the original pages untouched, so the text stays selectable, with your ink on top.
  • Split view. Two notebooks side by side in one window, such as lecture slides on the left and your notes on the right.
  • Unlimited canvas and templates. Any page can grow into a whiteboard. Templates include Cornell notes, planners, to-do lists and meeting notes.
  • Handwriting fonts. Shantell Sans, Caveat, Kalam, Patrick Hand and Indie Flower, embedded in exported PDFs.
  • Offline and private. No account, no cloud, no telemetry. Notebooks are files in a folder you choose, autosaved every 20 seconds.

A Home page for all your notebooks, with live previews, search and templates:

Home: all your notebooks, templates and the notebook folder

How it's built: Go, Gio, and no web view

dot! is written in Go with Gio, an immediate-mode GUI toolkit that draws everything on the GPU. There's no Electron and no web view. Each platform gets one native executable, 24–26 MB installed.

The code is split into small packages, each with one job:

Package Job
internal/input Stylus pressure from native OS events (macOS NSEvent, Windows Ink) and trackpad gestures
internal/ink Stroke engine: pressure curve, pen styles, smoothing, taper, shape recognition
internal/document Notebook model, .xopp and .dott read and write, undo and redo
internal/canvas Pages, zoom and pan, tools, GPU rendering with chunked, culled and cached page pictures
internal/pdf PDFium (Chrome's PDF engine) compiled to WebAssembly, so no C libraries are needed
internal/export Vector PDF writer with embedded fonts, annotated-PDF export, PNG and SVG
internal/ui Home, the tool dock, panels, menus and shortcuts

A few choices worth calling out:

  • PDFium through WebAssembly. Rendering PDFs usually means shipping a C library per platform. Running PDFium as Wasm keeps the build pure Go and cross-compilable. The Windows build cross-compiles from any OS.
  • Open file formats. dot! reads and writes Xournal++'s .xopp. Its own .dott format is a zip holding the notes, background images, the annotated PDF and a preview.
  • Nothing blocks the pen. Saving, opening and PDF rendering run in the background. Autosave writes a snapshot, so drawing never pauses.

Run from source with one command:

# open Home
go run ./cmd/dot

# open a notebook (.dott, .xopp or .pdf)
go run ./cmd/dot ~/notes/lecture.xopp
Enter fullscreen mode Exit fullscreen mode

Four performance problems, and how I fixed them

A handwriting app lives or dies on latency. Here are the problems that took the most work.

1. Fast handwriting came out jagged

Gio delivers pointer events once per frame. At 60 fps that drops most of what a pen sends, and quick letters turn into polygons. dot! now reads the pen at its full rate, about 240 samples a second. Pressure comes from native OS events and is matched to Gio's pointer events by timestamp.

The live stroke also goes through the same spline smoothing as the final stroke, so nothing jumps when you lift the pen. Processing one pen sample takes 0.6 µs.

2. Rainbow ink got slower the more you wrote

Rainbow, glitter, dashed and dotted ink were first drawn as hundreds of tiny shapes each. Frames slowed as ink piled up, and rainbow reached 45 ms a frame after 200 strokes. Now each colour is one shape per group of strokes, so the cost stays flat. After 120 strokes, rainbow draws in 5.6 ms and glitter in 8.4 ms, well under the 16 ms a 60 Hz screen needs.

The page's ink is also recorded in small chunks. An edit re-records only its chunk, and chunks off screen aren't drawn. A redraw with nothing changed takes 0.03 ms on a 20,000-stroke notebook.

3. Big PDFs ate all the memory

Scrolling a 65-page PDF climbed past 1.2 GB and kept going, because the last 10 rendered pages were kept at full quality (about 30 MB each). Now:

  • sharp pages share a 128 MB budget instead of a page count;
  • pages pushed out keep a small 72 dpi stand-in, so scrolling back shows them at once while the sharp version renders;
  • pages you scroll past are never rendered, so the page you stop on renders first;
  • the Go heap has a 512 MB soft limit (GOMEMLIMIT overrides it).

The same scroll now settles at about 490 MB.

4. Patching the GUI toolkit itself

The biggest win was inside Gio. Under zoom, every rectangle clip and fill took the stencil path. A page's clip and its paper each needed a screen-sized stencil texture every frame. With a whiteboard on screen, those textures grew to 8192², about 130 MB.

I patched Gio so a rectangle under a transform that only scales it stays a rectangle. A second patch frees Metal's upload buffer, which grew to twice the largest frame and was never given back. Both changes are documented in the repo under third_party/gioui.org/PATCHED.md.

GPU memory for one side of a full-screen split view:

Page on screen Before After
Whiteboard with 119 rectangles 228 MB 72 MB
65-page PDF notebook 141 MB 79 MB
34-page notebook with photos 260 MB 78 MB

The lesson: when a dependency is the bottleneck, read its source. The fix was small once I knew where to look.

How it compares

I ran both apps through the same automated workload on an Apple Silicon Mac: a 58-page notebook with 17,464 handwritten strokes, with drawing, fast scrolling, zooming and erasing.

Xournal++ 1.3 dot!
Open the 17 MB notebook 3.5 s 1.1 s
CPU when idle 3.0 % 0.0 %
Average CPU under load 54 % 37 %
CPU while drawing 19 % 27 %
Memory, idle 147 MB 202 MB

dot! opens large notebooks 3× faster and uses about 30% less CPU, which matters for battery and heat. Xournal++ uses less RAM, because dot! keeps visible pages ready on the GPU. This run predates the memory fixes above and hasn't been repeated yet.

Against the popular paid apps, the biggest difference is size: dot! is 24–26 MB installed, while Goodnotes, Notability and Noteshelf are 400–760 MB on the App Store.

To be honest about where others lead:

  • iPad and Android: Goodnotes, Notability and Noteshelf live there. dot! is for computers with a pen or tablet.
  • Sync: built into Goodnotes, OneNote and Saber. With dot!, keep your notebook folder in iCloud Drive or Dropbox.
  • Handwriting to text: MyScript does it best. dot! doesn't do it yet.
  • Layers, LaTeX and audio notes: Xournal++ has them, dot! doesn't yet.
  • Linux: the Linux build is still on 0.4, with 0.5 coming.

Try it, and help build it

dot! is free and open source under the Apache License 2.0. You can use, change and share it, including commercially.

  • Download: the website or the GitHub releases for macOS (Apple Silicon and Intel), Windows (x64 and ARM64) and Linux.
  • Build it yourself: you need Go 1.26+. Run go test ./... for the tests, which cover ink, shape recognition, round trips with real Xournal++ notebooks, PDF export and UI snapshots.
  • Product Hunt: dot! is live on Product Hunt. An upvote or a comment helps a lot.

On the roadmap next:

  • a layers panel;
  • Linux builds of 0.5;
  • decoding photos only when first shown, to lower memory when opening big notebooks;
  • faster PDF export by building pages in parallel;
  • benchmarks on Windows and Linux.

If you take notes with a pen on a computer, give dot! a try and tell me what's missing. Issues, pull requests and stars on GitHub are all welcome.

GitHub logo anikchand461 / dot

✍️ A fast, modern, offline handwriting notebook for macOS, Windows & Linux. Pen pressure, Excalidraw-style diagrams, PDF annotation, handwriting fonts, and full Xournal++ (.xopp) compatibility. Built with Go + Gio.

dot! logo

dot!

A fast, modern handwriting notebook. Offline, private, and friendly with Xournal++.
Write with a pen, sketch diagrams, annotate PDFs, and keep everything as files you own

macOS Windows Linux Go Offline License: Apache 2.0

dot! on Product Hunt

🌐 Website  ·  ⬇️ Download  ·  ⚖️ vs Xournal++

dot!: rainbow handwriting, the main menu and page setup


Why dot!?

I take my notes in Xournal++. It's a great, honest, open-source app: it handles a pen well, annotates PDFs, and its .xopp files are open. But day to day it felt dated:

  • a toolbar full of small icons and menus, where simple things take several clicks;
  • no way to fill a shape, bend an arrow, or type inside a box the way Excalidraw and tldraw allow;
  • no cropping a pasted screenshot on the page, and no handwriting fonts built in;
  • no home page: you find notes through a file dialog or the recent-files menu.

dot! keeps what makes Xournal++ good (offline, pen pressure, PDF annotation, open files) and rebuilds the experience…




Top comments (0)