<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Threading on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/tags/threading/</link><description>Recent content in Threading on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sat, 16 May 2026 17:42:12 +0100</lastBuildDate><atom:link href="http://ghafoorsblog.com/tags/threading/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Threads to Improve Performance</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/02-module/15-using-threads/</link><pubDate>Wed, 12 Nov 2025 22:17:40 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/02-module/15-using-threads/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a hands-on guide to implementing threading and multiprocessing in Python for performance optimization. Through a real-world image thumbnail generation scenario, it demonstrates converting sequential processing to parallel execution using ThreadPoolExecutor and ProcessPoolExecutor, measuring performance improvements, and understanding the differences between threads and processes in Python's execution model.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-business-problem-e-commerce-image-rebranding"&gt;The Business Problem: E-Commerce Image Rebranding&lt;/h2&gt;
&lt;h3 id="the-scenario"&gt;The Scenario&lt;/h3&gt;
&lt;p&gt;A company has an e-commerce website that includes numerous images of products that are available for sale. An upcoming rebranding effort requires that all of these images be replaced with new ones.&lt;/p&gt;</description></item><item><title>Parallelizing Operations for Performance</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/02-module/12-parallel-operation/</link><pubDate>Tue, 11 Nov 2025 22:47:33 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/02-module/12-parallel-operation/</guid><description>&lt;p class="lead text-primary"&gt;
This document examines concurrency and parallel execution as performance optimization strategies. It explains how operating systems manage processes, demonstrates techniques for splitting work across multiple processes and threads, distinguishes between I/O-bound and CPU-bound operations, and provides guidance on balancing parallelism to maximize throughput without overwhelming system resources.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-problem-with-blocking-io-operations"&gt;The Problem with Blocking I/O Operations&lt;/h2&gt;
&lt;h3 id="understanding-blocked-execution"&gt;Understanding Blocked Execution&lt;/h3&gt;
&lt;p&gt;Reading information from disk or transferring data over the network is a slow operation. In typical scripts, while this operation is ongoing, nothing else happens. The script is blocked, waiting for input or output while the CPU sits idle.&lt;/p&gt;</description></item><item><title>Using Threads to Improve Performance</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/02-module/15-threads/</link><pubDate>Tue, 11 Nov 2025 22:17:40 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/02-module/15-threads/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a hands-on guide to implementing threading and multiprocessing in Python for performance optimization. Through a real-world image thumbnail generation scenario, it demonstrates converting sequential processing to parallel execution using ThreadPoolExecutor and ProcessPoolExecutor, measuring performance improvements, and understanding the differences between threads and processes in Python's execution model.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-business-problem-e-commerce-image-rebranding"&gt;The Business Problem: E-Commerce Image Rebranding&lt;/h2&gt;
&lt;h3 id="the-scenario"&gt;The Scenario&lt;/h3&gt;
&lt;p&gt;A company has an e-commerce website that includes numerous images of products that are available for sale. An upcoming rebranding effort requires that all of these images be replaced with new ones.&lt;/p&gt;</description></item></channel></rss>