Hi everyone,
Some of you might remember my post from a while ago, where I shared my journey as a complete programming beginner falling in love with SWI-Prolog.
Since then, I have been continuously learning, fixing arities, and adjusting predicates with the help of AI to map out my retail POS engine, LOGICBIZ v2.0. To see how my amateur code behaves under a heavy workload, I recently ran a local simulation and stress test on my machine.
I wanted to share the raw statistics and screenshots from this experiment [IMAGE, IMAGE].
For this local setup:
- The Workload: The simulator spawned 100 virtual cashiers running concurrently, processing a total volume of 100,000 generated transactions.
- The Pipeline: Each single transaction is split into 5 physical SQL queries (
Induk,Stok,Waktu,Detail,Rekap) channeled through an asynchronous background thread worker, while enforcing SQLCipher 256-bit AES encryption and generating SHA-256 signatures per invoice. - The Result: The local simulation completed successfully with ZERO DEADLOCK over a total execution time of 12,574 seconds.
Even though the simulation triggered over 64 billion logical inferences, the terminal output shows that SWI-Prolog kept the internal active memory usage at around 1,115 KB. The garbage collector also worked frequently, reclaiming 21.7 GB of memory overhead throughout the loop.
I am also sharing a secondary screenshot of my Windows Task Manager taken during the simulation [IMAGE]. Since it is a local test running on a single machine, I was glad to see that CPU utilization hovered around 27% and Disk I/O sat mostly at 0%, which shows that the asynchronous SQLCipher background worker successfully absorbed the write stress without choking the host OS.
As someone who only started coding from scratch a few months ago, seeing these logs on my screen gives me a lot of confidence in SWI-Prolog’s efficiency, even when handled by a hobbyist like me. I would love to hear any thoughts or feedback from the experts here on how to improve this pipeline further!

