---
title: "Making fetch happen: Building a general-purpose query and render scheduler"
description: "Datadog replaced a tangled ~20-parameter dashboard scheduler with separate, general-purpose query and render schedulers used by widgets across the product."
url: "https://swe.quest/articles/making-fetch-happen-building-a-general-purpose-query-and-render-scheduler-3be522c5ec84d80d"
canonical: "https://www.datadoghq.com/blog/engineering/making-fetch-happen-building-a-general-purpose-query-and-render-scheduler/"
source: "Datadog Engineering"
published: "2023-04-17"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["web-performance","frontend","browsers","javascript"]
---

# Making fetch happen: Building a general-purpose query and render scheduler

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2023-04-17, 10 min read, Case study. Original: [https://www.datadoghq.com/blog/engineering/making-fetch-happen-building-a-general-purpose-query-and-render-scheduler/](https://www.datadoghq.com/blog/engineering/making-fetch-happen-building-a-general-purpose-query-and-render-scheduler/)

## Summary

Datadog replaced a tangled ~20-parameter dashboard scheduler with separate, general-purpose query and render schedulers used by widgets across the product. The new query scheduler fetches visible widgets immediately and runs ranked offscreen fetches at up to 10 per fixed 2000ms window, pausing when pending fetches pile up. The result was a flatter request distribution and far fewer 429 errors. Rendering now goes through the Browser Scheduling API's postTask, with visible widgets at 'user-visible' priority and offscreen ones at 'background', which cut render count and duration and greatly reduced long tasks during interactions like drag-and-drop.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Web performance](https://swe.quest/tags/web-performance.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- browser main thread and event loop
- JavaScript Promises ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- frontend data fetching ([easy posts on Frontend](https://swe.quest/tags/frontend.md?difficulty=easy))

## Keywords

Datadog Dashboards, Browser Scheduling API, scheduler.postTask, TaskController, Long Tasks

## Related posts

- [Who's on call? How we improved schedule rendering performance 2,500x](https://swe.quest/articles/who-s-on-call-how-we-improved-schedule-rendering-performance-2-500x-8f76a3cfe21d61b4.md): incident.io · 2026-04-28 · Medium · 17 min read · Performance engineering, Go, Algorithms, AI for coding, Debugging
  incident.io's on-call schedule renderer, which computes future shifts on the fly from rotation config, working hours and fair-scheduling rules, became dramatically faster through a series of fixes culminating in a ~2,500x speedup.
- [From latency to instant: Modernizing GitHub Issues navigation performance](https://swe.quest/articles/from-latency-to-instant-modernizing-github-issues-navigation-performance-d76fe4f2daa6064a.md): GitHub Engineering · 2026-05-14 · Medium · 13 min read · Web performance, Caching, Frontend, Local-first & sync, Browsers
  GitHub made Issues navigation feel instant by moving to a local-first, stale-while-revalidate model: render issue pages from client-side data first, then revalidate in the background.
- [Rendering Engine Tales: Road to Concurrent React](https://swe.quest/articles/rendering-engine-tales-road-to-concurrent-react-735d8093c1f69c78.md): Zalando Engineering · 2023-07-10 · Medium · 16 min read · React, Frontend, Web performance, Debugging
  Zalando migrated its Rendering Engine framework, which renders the Fashion Store from backend-defined Entity trees mapped to React Renderers, to React 18 concurrent rendering.
- [How Render Workflows powers our internal data pipeline](https://swe.quest/articles/how-render-workflows-powers-our-internal-data-pipeline-2023ee9b00fda571.md): Render · 2026-08-25 · Medium · 10 min read · Data pipelines, Analytics & OLAP, Python, Testing, Cost optimization
  Render's two-person data team replaced a time-spaced set of cron jobs with a Render Workflows DAG that waits for a late-arriving Go-built invoice projection dataset, runs dbt in projection-independent and projection-dependent partial builds, then fans out downstream tasks like doc sync, cost monitoring and Metabase cache warming in parallel.
- [Speedometer 3.0: The Best Way Yet to Measure Browser Performance](https://swe.quest/articles/speedometer-3-0-the-best-way-yet-to-measure-browser-performance-2c6a7e3e4a16f5e5.md): WebKit · 2024-03-11 · Medium · 7 min read · Browsers, Performance engineering, Web performance, Frontend
  Speedometer 3.0, jointly governed by Blink, Gecko and WebKit developers, changes how browser responsiveness is measured.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
