← Graph

Pass IDs to background jobs, not objects

takeaway 1 connections

Caio Almeida's rule: pass numeric IDs (or simple scalar values) into background jobs and reload the object inside, rather than serializing a big object into the job payload. Sometimes unserializing a large object from the queue is slower than just doing a fresh database query to fetch it.

type
recommendation
takeaway Pass IDs to background jobs, not objects
from_talk
Caio's rule for avoiding serialization overhead.

Provenance

Created in
Performance Panel at wroclove.rb 2024 2026-04-17 23:20
Read by
2 extractions