{"id":15435149,"url":"https://github.com/edbzn/post-task-scheduler-playground","last_synced_at":"2026-02-18T13:33:51.543Z","repository":{"id":215798345,"uuid":"739797072","full_name":"edbzn/post-task-scheduler-playground","owner":"edbzn","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-06T15:50:09.000Z","size":3035,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T17:28:25.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edbzn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-06T15:19:19.000Z","updated_at":"2024-01-11T07:31:08.000Z","dependencies_parsed_at":"2024-01-06T16:56:08.202Z","dependency_job_id":null,"html_url":"https://github.com/edbzn/post-task-scheduler-playground","commit_stats":null,"previous_names":["edbzn/scheduler-playground","edbzn/post-task-scheduler-playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edbzn/post-task-scheduler-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edbzn%2Fpost-task-scheduler-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edbzn%2Fpost-task-scheduler-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edbzn%2Fpost-task-scheduler-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edbzn%2Fpost-task-scheduler-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edbzn","download_url":"https://codeload.github.com/edbzn/post-task-scheduler-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edbzn%2Fpost-task-scheduler-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29580808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T18:42:48.143Z","updated_at":"2026-02-18T13:33:46.534Z","avatar_url":"https://github.com/edbzn.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scheduler playground\n\nFollowing the [optimize long tasks](https://web.dev/articles/optimize-long-tasks) article, here's a playground to try the browser's native scheduling API.\n\n\nThis example renders a list of 100,000 div elements and x4 CPU throttling.\n\n```js\nfor (let i = 0; i \u003c 100_000; i++) {\n  // with scheduling\n  scheduler.postTask(() =\u003e render(i))\n\n  // without scheduling\n  // render(i)\n}\n\nfunction render(i) {\n  const item = document.createElement('div')\n  item.innerText = `Item ${i}`\n  item.style.display = 'inline-block'\n  document.body.appendChild(item)\n}\n```\n\n## Results\n\n### without scheduling\n\nResults in a single huge 8.35s user-blocking task (FCP 11.16s).\n\n[base-profile.json](base-profile.json)\n\n![base-profile](base-profile.png)\n\n### with scheduling using `scheduler.postTask(render)`\n\nResults in many non-blocking tasks (FCP 3.74s).\n\n[post-task-profile.json](post-task-profile.json)\n\n![post-task-profile](post-task-profile.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedbzn%2Fpost-task-scheduler-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedbzn%2Fpost-task-scheduler-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedbzn%2Fpost-task-scheduler-playground/lists"}