This action will delete this post on this instance and on all federated instances, and it cannot be undone. Are you certain you want to delete this post?
This action will delete this post on this instance and on all federated instances, and it cannot be undone. Are you certain you want to delete this post?
This action will block this actor and hide all of their past and future posts. Are you certain you want to block this actor?
This action will block this object. Are you certain you want to block this object?
Are you sure you want to delete the OAuth client [Client Name]? This action cannot be undone and will revoke all access tokens for this client.
Are you sure you want to revoke the OAuth token [Token ID]? This action cannot be undone and will immediately revoke access for this token.
| Introduction | https://epiktistes.com/introduction |
|---|---|
| GitHub | https://github.com/toddsundsted/ktistec |
| Pronouns | he/him |
| 🌎 | Sector 001 |


home sweet scaffolding… it’s nice to be back in NYC…

Whoop, whoop: We have a shiny new release!
Crystal 1.17.0 is out now!
It brings better, manual memory management for libxml2, as well as several improvements to execution contexts and Windows support.
And there's a new compiler tool that reports coverage of macros.
For more details, check the release notes: https://crystal-lang.org/2025/07/16/1.17.0-released/

After a mental health break, release v2.4.7 of Ktistec is out. The biggest improvement is the addition of a command line switch/option to run garbage collection on startup. Garbage collection, in this context, trims down your database by deleting old ActivityPub objects that are not connected to your user through:
It reduced the size of my database ~24%. Details on usage, warnings, etc. are in the README.
Other changes:
Fixed
WITH RECURSIVE queries.Changed
Other

hmm… ‘bout time for the decennial cleanup of my dot emacs file…



Release v2.4.6 of Ktistec is out. As mentioned in an earlier post, this release focuses on database performance improvements. This means caching the results of expensive queries (like counting all posts with a particular hashtag or mention). On my instance at least, pages like the notifications page are now snappier.
There are still slow queries (queries that take more than 50msec). Most of those are requests for pages of old posts where none of the necessary database pages are in the page cache. I have increased the page cache size, and that reduces the frequency, but I don't see an immediate fix.
Fixed
Changed
Removed
X-Auth-Token.Other
POST socket operations.I don't have an immediate plan for the next release. There have been a bunch of feature requests that I think have merit. I'll probably get started on some of those.

You can specify the SQLite database and pass options (pragmas like cache_size, journal_mode, ...) on the command line when you start the Ktistec server. The following example sets the cache size to 20,000 pages (up from the default of 2,000 pages) which improves performance on larger instances.
KTISTEC_DB=~/ktistec.db\?cache_size=-20000 ./server
You can also enable the write-ahead log (but make sure you know what that means).
KTISTEC_DB=~/ktistec.db\?journal_mode=wal\&synchronous=normal ./server
Pragmas supported are limited to those listed here.

A new release of ktistec that improves database performance is imminent. In the past, database optimization usually meant "fixing a bunch of poorly constructed queries", and I'm sure there's more of that to do—I'm not an expert. But this time, I found most of the queries were as good as they were going to get on my watch (I'm not an expert). If you have a million records and you need to filter and count them, that's just going to take some time...
So this time, I focused on caching the results of queries like that (which really means I focused on cache invalidation, right). A case in point is commit d544b1af. Previously, the nodeinfo endpoint filtered and counted posts on every request, and it took +80msec to do that. Worse, the filtering pushed everything else out of the sqlite page cache, which made the next, unrelated database query slow!
Caching this value, and only recounting when I post something, not only dropped the service time for the request to ~1msec but actually improved database performance, generally!
More to come...

Finally I could release Blueprint 1.0.0 after almost 2 years in development.