{"id":21553200,"url":"https://github.com/bbvaengineering/ember-task-scheduler","last_synced_at":"2025-04-10T07:50:22.994Z","repository":{"id":24080369,"uuid":"100578438","full_name":"BBVAEngineering/ember-task-scheduler","owner":"BBVAEngineering","description":"Schedule tasks to try preserve 60 FPS rate on browsers.","archived":false,"fork":false,"pushed_at":"2023-03-04T15:05:15.000Z","size":4792,"stargazers_count":4,"open_issues_count":20,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T08:49:22.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BBVAEngineering.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-17T08:08:51.000Z","updated_at":"2021-12-01T09:43:06.000Z","dependencies_parsed_at":"2024-06-21T20:19:28.881Z","dependency_job_id":"a1ac4246-4bc3-4415-bd05-59ecffcbff79","html_url":"https://github.com/BBVAEngineering/ember-task-scheduler","commit_stats":{"total_commits":93,"total_committers":12,"mean_commits":7.75,"dds":0.7634408602150538,"last_synced_commit":"892bccb9d74a9e364d2d508d45e3c11af1a6d5aa"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVAEngineering%2Fember-task-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVAEngineering%2Fember-task-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVAEngineering%2Fember-task-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVAEngineering%2Fember-task-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BBVAEngineering","download_url":"https://codeload.github.com/BBVAEngineering/ember-task-scheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248182010,"owners_count":21060891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-11-24T07:09:48.060Z","updated_at":"2025-04-10T07:50:22.972Z","avatar_url":"https://github.com/BBVAEngineering.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-task-scheduler\n\n[![CI](https://github.com/BBVAEngineering/ember-task-scheduler/actions/workflows/ci.yml/badge.svg)](https://github.com/BBVAEngineering/ember-task-scheduler/actions/workflows/ci.yml)\n[![NPM version](https://badge.fury.io/js/ember-task-scheduler.svg)](https://badge.fury.io/js/ember-task-scheduler)\n[![Dependency Status](https://david-dm.org/BBVAEngineering/ember-task-scheduler.svg)](https://david-dm.org/BBVAEngineering/ember-task-scheduler)\n[![codecov](https://codecov.io/gh/BBVAEngineering/ember-task-scheduler/branch/master/graph/badge.svg)](https://codecov.io/gh/BBVAEngineering/ember-task-scheduler)\n[![Ember Observer Score](https://emberobserver.com/badges/ember-task-scheduler.svg)](https://emberobserver.com/addons/ember-task-scheduler)\n\n## Information\n\n[![NPM](https://nodei.co/npm/ember-task-scheduler.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/ember-task-scheduler/)\n\nAn [ember-cli addon](http://www.ember-cli.com/) to schedule tasks to try to preserve 60 FPS rate on browsers.\n\n## Install in ember-cli application\n\nIn your application's directory:\n\n    ember install ember-task-scheduler\n\n## Usage\n\n```javascript\n// Inject the service\n@service scheduler;\n```\n\n```javascript\n// To schedule a callback you can use the same syntax as with Ember.run.\nthis.scheduler.schedule(this, 'method', arg1, arg2);\n\n// To schedule a unique method.\nthis.scheduler.scheduleOnce(this, 'method', arg1, arg2);\n\n// You can also run callbacks without context.\nthis.scheduler.schedule(() =\u003e {\n  // Do job here.\n});\n\n// All exceptions will be throw to Ember.onerror method.\n```\n\n## Configuration\n\nTo setup, you can set the following variables on `config/environment` file:\n\n```json\n{\n  \"taskScheduler\": {\n    \"FPS\": 60\n  }\n}\n```\n\nIf variables are unset, the will default to above configuration.\n\n## Motivation\n\nWhen using `requestAnimationFrame` method, there are some problems when developing big applications.\n\nSome times, `requestAnimationFrame` method will be executed several times on same browser frame. This will make the browser to execute all code on the next available frame. This can cause the browser to freeze due to the lack of frame scheduling.\n\nThis addon will handle this type of scheduling by running a FIFO queue with callbacks. On other words, when you run `schedule` method twice on same frame. This addon will try to execute the first callback on the next available frame and, if the frame can fit the next callback (execution under 60 FPS rate), will try run it. Otherwise, it will be executed on the next available frame.\n\n## Contribute\n\nIf you want to contribute to this addon, please read the [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BBVAEngineering/ember-task-scheduler/tags).\n\n## Authors\n\nSee the list of [contributors](https://github.com/BBVAEngineering/ember-task-scheduler/graphs/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbvaengineering%2Fember-task-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbvaengineering%2Fember-task-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbvaengineering%2Fember-task-scheduler/lists"}