---
title: "#performance Code Snippets"
lang: "en"
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/tags/performance
---

[All Tags](/codesnippets/tags)

# #Performance

[Home](/)›[All Snippets](/codesnippets)›[All Tags](/codesnippets/tags)›[Performance](/codesnippets/tags/performance)

Tag

# #Performance

LanguageAllBash (7)Python (5)Typescript (3)Bash and Python (1)Python, Node.js and Go (1)SQL and Python (1)CategoryAllDevops (9)Shell scripting (6)Aws (5)Automation (3)Productivity (3)Python (3)Backend (2)Database (2)Nodejs (2)Performance (2)Ai ml (1)Async (1)Bash (1)Cloud (1)Computer vision (1)Document processing (1)Linux (1)Networking (1)Security (1)Typescript (1)TagAllDevOps (7)Bash (6)Python (6)Shell Scripting (5)Automation (4)AWS (4)NodeJS (4)Performance (4)Configuration (3)TypeScript (3)Backend (2)Boto3 (2)CI/CD (2)Cloud (2)Concurrency (2)DevTools (2)Environment Variables (2)IAM (2)Linux (2)Microservices (2)POSIX (2)Productivity (2)S3 (2)Terminal (2)AI Models (1)Aiohttp (1)Asyncio (1)AWS SDK v3 (1)BestPractices (1)BigData (1)Caching (1)CloudSecurity (1)Computer Vision (1)Cron (1)CRUD (1)Database (1)DataScience (1)Document Processing (1)DocumentClient (1)Dotenv (1)DynamoDB (1)EC2 (1)Echo (1)Exponential Backoff (1)Flock (1)Go (1)HTTP (1)Indexes (1)Infrastructure (1)Locking (1)Machine Learning (1)MemoryOptimization (1)MLOps (1)MultiEnvironment (1)OCR (1)Open Source (1)Optimization (1)Pid file (1)PostgreSQL (1)Printf (1)QueryOptimization (1)Redis (1)Retry (1)Scripting (1)Scripting Best Practices (1)SecretsManagement (1)SecretsManager (1)Security (1)Shell (1)SQL (1)Text Recognition (1)Validation (1)Vault (1)Zod (1)Zsh (1)SortNewest firstOldest firstA to ZShortest read first

[![Python Async HTTP Requests with aiohttp: Fetch Multiple URLs Concurrently](/_astro/hero.DFXqyT8a_Zqhl7o.webp)](/codesnippets/post/python-async-http-aiohttp-concurrent-requests)

## [Python Async HTTP Requests with aiohttp: Fetch Multiple URLs Concurrently](/codesnippets/post/python-async-http-aiohttp-concurrent-requests)

-   [Python](/codesnippets/categories/python)
-   [Async](/codesnippets/categories/async)
-   26 Jul 2026
-   05 Mins read

Quick Tip Reuse one aiohttp session, fan your requests out with asyncio.gather, and cap them with a semaphore to fetch hundreds of URLs in the time one loop would take. The Problem \*\*The

[#Python](/codesnippets/tags/python)[#Aiohttp](/codesnippets/tags/aiohttp)[#Asyncio](/codesnippets/tags/asyncio)+3 tags

[Python](/codesnippets/python)

[View Code](/codesnippets/post/python-async-http-aiohttp-concurrent-requests)

[![Redis Caching Patterns: Cache-Aside, Write-Through & Cache Invalidation](/_astro/hero.Ck2oLF89_ZPiYlL.webp)](/codesnippets/post/redis-caching-patterns-architecture)

## [Redis Caching Patterns: Cache-Aside, Write-Through & Cache Invalidation](/codesnippets/post/redis-caching-patterns-architecture)

-   [Backend](/codesnippets/categories/backend)
-   [Performance](/codesnippets/categories/performance)
-   07 Apr 2026
-   05 Mins read

Need to scale your backend without throwing money at servers? Start with Redis caching patterns. Most databases can handle hundreds of queries per second, but thousands? Your app slows to a crawl

[#Redis](/codesnippets/tags/redis)[#Caching](/codesnippets/tags/caching)[#Performance](/codesnippets/tags/performance)+6 tags

[Python, Node.js and Go](/codesnippets/python-nodejs-and-go)

[View Code](/codesnippets/post/redis-caching-patterns-architecture)

[![PostgreSQL Query Optimization: Indexes, EXPLAIN ANALYZE & Execution Plans](/_astro/hero.WD7Zwlat_2dqoYO.webp)](/codesnippets/post/postgresql-query-optimization-indexes-explain)

## [PostgreSQL Query Optimization: Indexes, EXPLAIN ANALYZE & Execution Plans](/codesnippets/post/postgresql-query-optimization-indexes-explain)

-   [Database](/codesnippets/categories/database)
-   [Performance](/codesnippets/categories/performance)
-   29 Mar 2026
-   05 Mins read

Need to optimize slow PostgreSQL queries? Use EXPLAIN ANALYZE and targeted indexing. Slow database queries kill application performance. Most developers don't know where the actual bottleneck is,

[#PostgreSQL](/codesnippets/tags/postgresql)[#QueryOptimization](/codesnippets/tags/queryoptimization)[#Indexes](/codesnippets/tags/indexes)+4 tags

[SQL and Python](/codesnippets/sql-and-python)

[View Code](/codesnippets/post/postgresql-query-optimization-indexes-explain)

[![Optimizing your python code with \_\_slots\_\_?](/_astro/hero.DP_vYsHU_gYDXn.webp)](/codesnippets/post/python-slots-optimization)

## [Optimizing your python code with \_\_slots\_\_?](/codesnippets/post/python-slots-optimization)

-   [Python](/codesnippets/categories/python)
-   [Productivity](/codesnippets/categories/productivity)
-   16 Jul 2025
-   04 Mins read

Memory optimization with slots Understanding the problem Optimizing data models in big data workflows with slots In big data and MLOps workflows, you often work with massive

[#Python](/codesnippets/tags/python)[#MemoryOptimization](/codesnippets/tags/memoryoptimization)[#DataScience](/codesnippets/tags/datascience)+4 tags

[Python](/codesnippets/python)

[View Code](/codesnippets/post/python-slots-optimization)
