<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet href="/s/inc/rss.xsl" type="text/xsl"?>
    <rss version="2.0"  xmlns:atom="http://www.w3.org/2005/Atom">
        <channel>
            <title>RSS feed for tag performance on Raymii.org</title> 
            <link>https://raymii.org/s/tags/performance.xml</link> 
            <description>RSS feed for tag performance on Raymii.org</description>
            <atom:link href="https://raymii.org/s/tags/performance.xml" rel="self" type="application/rss+xml" />
    
            <item>
                <title>My go-to C++ code for asynchronous work processing on a separate thread</title> 
                <link>https://raymii.org/s/software/My_go-to_Cpp_code_for_asynchronous_work_processing_on_a_separate_thread.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/software/My_go-to_Cpp_code_for_asynchronous_work_processing_on_a_separate_thread.html</guid>
                <description>You probably recognise this situation. You're working on your code and realise that the thing you're writing might take long, be blocking or is batch-wise. It might be resizing images, calling some API or processing hardware inputs or a stream of incoming messages. These tasks, if not handled efficiently, can halt your application, leaving it unresponsive. To avoid this, one solution is to offload these time-consuming operations to a separate thread, allowing the main application to continue executing without interruptions.
In this article, I'll show you how you can implement asynchronous work processing in C++ using a worker thread. This example class is my go-to for this situation and is easily adapted to handle more complex use cases. It has a queue of work items and uses a `std::thread`, a `std::mutex` combined with a `std::condition_variable` to manage work asynchronously, processing items one by one.</description> 
                <pubDate>Tue, 17 Dec 2024 23:59:00 GMT</pubDate>
                <lastBuildDate>Tue, 17 Dec 2024 23:59:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Logging all C++ destructors, poor mans run-time tracing</title> 
                <link>https://raymii.org/s/software/Logging_all_Cpp_destructors_poor_mans_run-time_tracing.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/software/Logging_all_Cpp_destructors_poor_mans_run-time_tracing.html</guid>
                <description>I recently faced a challenging issue with an application that wasn't shutting down correctly, either segfaulting or terminating without an active exception. Running the program via `valgrind` to check for memory leaks wasn't possible because the program couldn’t perform its cleanup if it didn't shut down correctly. This article covers adding runtime instrumentation provided by `gcc` to log destructors. This helped me figure out what was still left over from the closed-source framework in use preventing correct shutdowns or causing segfaults. It includes example code, setup instructions and insights into handling shutdown issues in large, multi-threaded codebases.</description> 
                <pubDate>Sat, 21 Sep 2024 23:59:00 GMT</pubDate>
                <lastBuildDate>Sat, 21 Sep 2024 23:59:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Drawing a Circle in Qt QML three different ways</title> 
                <link>https://raymii.org/s/articles/Drawing_a_Circle_in_Qt_QML_three_different_ways.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/articles/Drawing_a_Circle_in_Qt_QML_three_different_ways.html</guid>
                <description>Qt has no `Circle` built in to QML as a basic type, as for example the `Rectangle` or the `Button` control. This post shows you how to get a `Circle` in QML, from the most basic method (a `Rectangle` with a `radius` of 180) to more advanced methods, using the `Canvas` JavaScript API (which allows us to draw a partially filled Circle, for a Pie Chart) and a `c++` control based on `QQuickPaintedItem`. I wanted to experiment with the `Canvas` QML control and the `QQuickPaintedItem` C++ interface to get a better understanding of Qt and QML drawing interfaces, this post reflects that journey including showing your grouped QML properties exposed from C++.</description> 
                <pubDate>Wed, 05 Jul 2023 23:59:00 GMT</pubDate>
                <lastBuildDate>Wed, 05 Jul 2023 23:59:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Named Booleans prevent C++ bugs and save you time</title> 
                <link>https://raymii.org/s/blog/Named_Booleans_prevent_bugs.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/blog/Named_Booleans_prevent_bugs.html</guid>
                <description> During a recent code review I found a hard to spot bug, a misplaced parenthesis in an `if` statement. I often employ a technique I call `named booleans`, which would have prevented this bug. It's a simple technique, instead of a long `if` statement, give every comparison a seperate boolean variable with a descriptive name and use those variables is the `if` statement. This post shows the bug in question, an example of my `named booleans` technique and another tip regarding naming magic numbers.</description> 
                <pubDate>Fri, 17 Feb 2023 20:21:00 GMT</pubDate>
                <lastBuildDate>Fri, 17 Feb 2023 20:21:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Add moc includes to speed up Qt compilation</title> 
                <link>https://raymii.org/s/blog/Qt_add_moc_includes_to_speed_up_compilation.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/blog/Qt_add_moc_includes_to_speed_up_compilation.html</guid>
                <description>The Meta-Object Compiler, `moc`, handles Qt's C++ extensions and it is required for signals and slots and properties in Qt. `moc` reads C++ header files and if the `Q_OBJECT` macro is used, it generates an extra `.cpp` file named `moc_filename.cpp` containing extra (meta-object) code. This post has a bit of background information and a shell script to automatically include `moc_*.cpp` files in your code whenever `Q_OBJECT` is used. If you use `qmake`, this will probably speed up your build and if you use `cmake`, this will probably speed up incremental builds (when `CMAKE_AUTOMOC` is `on`).</description> 
                <pubDate>Mon, 12 Dec 2022 00:00:00 GMT</pubDate>
                <lastBuildDate>Mon, 12 Dec 2022 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Distributed load testing with Tsung</title> 
                <link>https://raymii.org/s/articles/Basic_Website_load_testing_with_Tsung.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/articles/Basic_Website_load_testing_with_Tsung.html</guid>
                <description>At $dayjob I manage a large OpenStack Cloud. Next to that I also build high-performance and redundant clusters for customers. Think multiple datacenters, haproxy, galera or postgres or mysql replication, drbd with nfs or glusterfs and all sorts of software that can (and sometimes cannot) be clustered (redis, rabbitmq etc.). Our customers deploy their application on there and when one or a few components fail, their application stays up. Hypervisors, disks, switches, routers, all can fail without actual service downtime. Next to building such clusters, we also monitor and manage them. When we build such a cluster (fully automated with Ansible) we do a basic load test. We do this not for benchmarking or application flow testing, but to optimize the cluster components. Simple things like the mpm workers or threads in Apache or more advanced topics like MySQL or DRBD. Optimization there depends on the specifications of the servers used and the load patterns. Tsung is a high-performance but simple to configure and use piece of software written in Erlang. Configuration is done in a simple readable XML file. Tsung can be run distributed as well for large setups. It has good reporting and a live web interface for status and reports during a test.</description> 
                <pubDate>Thu, 13 Apr 2017 00:00:00 GMT</pubDate>
                <lastBuildDate>Thu, 13 Apr 2017 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>KVM convert qcow2 disk images to raw disk images for performance</title> 
                <link>https://raymii.org/s/tutorials/KVM_convert_qcow2_disk_images_to_raw_disk_images_for_performance.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/tutorials/KVM_convert_qcow2_disk_images_to_raw_disk_images_for_performance.html</guid>
                <description>This tutorial shows you how to convert KVM qcow2 disk images to raw disk images. The qcow2 disk format has some decent features like encryption, compression and copy to write support. However, the compression and the copy processes make it quite a bit slower than raw disk images. Sometimes you want to convert the disk images so that the VM will perform better. </description> 
                <pubDate>Sun, 16 Feb 2014 00:00:00 GMT</pubDate>
                <lastBuildDate>Sun, 16 Feb 2014 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Munin optimization guide for Debian (rrdcached, tmpfs, ionice and nice)</title> 
                <link>https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html</guid>
                <description>This is a tutorial to help you tune the performance of Munin using rrdcached, tmpfs, ionice, nice and a few other tricks.</description> 
                <pubDate>Sat, 08 Dec 2012 00:00:00 GMT</pubDate>
                <lastBuildDate>Sat, 08 Dec 2012 00:00:00 GMT</lastBuildDate>
            </item>
    
        </channel>
    </rss>
    
    