Python on Serverless: Strategies for Peak Performance - Alejandro Cabello JimƩnez

EuroPython Conference
407 views •

[EuroPython 2026 - S4 on 2026-07-16] šŸŽ¤ *Python on Serverless: Strategies for Peak Performance by Alejandro Cabello JimĆ©nez* šŸ”— https://ep2026.europython.eu/session/python-on-serverless-strategies-for-peak-performance šŸ“ Abstract: We deployed Python in serverless environments and quickly saw the performance limits. Serverless systems suffer from startup latency, memory overhead, and repeated object creation as their executions start almost from scratch. Those extra seconds made our user experience painfully slow—and we couldn’t afford it. We looked into the performance of our flight search engine, ran profilers, and applied optimizations. We found real gains when *tuning Python’s GC,* reducing *stop-the-world pauses,* and introducing an *asynchronous post-execution process* that runs after the handler returns. We reduced execution time from *1.2 seconds to 300 milliseconds—a 4Ɨ speedup* with just a few tweaks. Understanding *Python’s memory model* and its runtime behavior was essential, and it’s something we’ll dive into during the talk. What we share is based on *AWS Lambda,* but it can be applied to any short-lived Python system—whether serverless or containerized. Another big gain came from replacing `Pydantic` with `TypedDict` for faster parsing, using *Redis* strategically to distribute operations, and restructuring code to eliminate duplicated transformations. Our web API processes thousands of flight offers—deserialize, enrich, transform—and every millisecond counts. While covering optimization techniques, when they matter, and how we measured their impact, the main idea is that you will walk away with tactics that help your system stay fast while it grows. --- This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License: https://creativecommons.org/licenses/by-nc-sa/4.0/

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close