Right on my first blog post about Cutelyst users asked me about more “realistic” benchmarks and mentioned TechEmpower benchmarks. Though it was a sort of easy task to build the tests at that time it didn’t seem to be useful to waste time as Cutelyst was moving target.
Around 0.12 it became clear that the API was nearly freezing and everyone loves benchmarks so it would serve as a “marketing” thing. Since the beginning of the project I’ve learned lots of optimizations which made the code get faster and faster, there is still room from improvement, but changes now need to be carefully measured.
Cutelyst is the second Web Framework on TechEmpower benchmarks that uses Qt, the other one being treefrog, but Qt’s appearance was noticed on their blog:
The cutelyst-thread tests suffered from a segfault (that was restarted by master process), the fix is in 1.0.0 release but it was too late for round 13, so round 14 it will get even better results.
If you want to help MongoDB/Grantlee/Clearsilver tests are still missing 😀
Cutelyst the Qt web framework just reached it’s first stable release, it’s been 3 years since the first commit and I can say it finally got to a shape where I think I’m able to keep it’s API/ABI stable. The idea is to have any break into a 2.0 release by the end of next year although I don’t expect many changes as the I’m quite happy with it’s current state.
The biggest change from the last release is the SessionStoreFile class, it initially used QSettings for it’s simplicity but it was obvious that it’s performance would be far from ideal, so I replaced QSettings with a plain QFile and QDataStream, this produced smaller session files and made the code twice as fast, but profiling was showing it was still slow because it was writing to disk multiple times on the same request. So the code was changed to merge the changes and only save to disk when the Context get’s destroyed, on my machine the performance went from 3,5k to 8.5k on read and writes and 4k to 12k on reads, this is on the same session id, should probably be faster with different ids. This is also very limited by the disk IO as we use a QLockFile to avoid concurrency, so if you need something faster you can subclass SessionStore and use Sql or Redis…
Besides that the TechEmpower 13th preview rounds showed a segfault in the new Cutelyst WSGI in threaded mode, a very hard to reproduce but with an easy fix. The initial fix made the code a bit ugly so I searched to see if XCode clang got an update on thread_local feature and finally, XCode 8 has support for it, if you are using XCode clang now you need version 8.
Many other small bugs also got in and API from 0.13.0 is probably unchanged.
Now if you are a distro packager please 😀 package it, or if you are a dev and was afraid of API breaks keep calm and have fun!