All Projects → Tom910 → Frame Scheduling

Tom910 / Frame Scheduling

Licence: mit
Asynchronous non-blocking running many tasks in JavaScript. Demo https://codesandbox.io/s/admiring-ride-jdoq0

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Frame Scheduling

Quartznet
Quartz Enterprise Scheduler .NET
Stars: ✭ 4,825 (+7439.06%)
Mutual labels:  scheduler, scheduling, scheduled-jobs, scheduled-tasks
josk
🏃🤖 Scheduler and manager for jobs and tasks in node.js on multi-server and clusters setup
Stars: ✭ 27 (-57.81%)
Mutual labels:  scheduler, scheduled-jobs, tasks
King.Service
Task scheduling for .NET
Stars: ✭ 34 (-46.87%)
Mutual labels:  scheduler, scheduling, scheduled-tasks
Cronscheduler.aspnetcore
Cron Scheduler for AspNetCore 2.x/3.x or DotNetCore 2.x/3.x Self-hosted
Stars: ✭ 100 (+56.25%)
Mutual labels:  scheduler, scheduling, scheduled-jobs
Jaas
Run jobs (tasks/one-shot containers) with Docker
Stars: ✭ 291 (+354.69%)
Mutual labels:  tasks, scheduling
Rq Scheduler
A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
Stars: ✭ 1,095 (+1610.94%)
Mutual labels:  scheduler, scheduled-tasks
Unityasync
Task and Async Utility Package for Unity. Start co-routines from anywhere.
Stars: ✭ 58 (-9.37%)
Mutual labels:  tasks, async
Sparklens
Qubole Sparklens tool for performance tuning Apache Spark
Stars: ✭ 345 (+439.06%)
Mutual labels:  scheduler, scheduling
Concurrencpp
Modern concurrency for C++. Tasks, executors, timers and C++20 coroutines to rule them all
Stars: ✭ 340 (+431.25%)
Mutual labels:  tasks, scheduler
Active workflow
Turn complex requirements to workflows without leaving the comfort of your technology stack.
Stars: ✭ 413 (+545.31%)
Mutual labels:  scheduler, scheduling
Arq
Fast job queuing and RPC in python with asyncio and redis.
Stars: ✭ 695 (+985.94%)
Mutual labels:  tasks, async
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+978.13%)
Mutual labels:  async, scheduler
Cpprestsdk
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Stars: ✭ 6,631 (+10260.94%)
Mutual labels:  tasks, async
Jobrunr
An extremely easy way to perform background processing in Java. Backed by persistent storage. Open and free for commercial use.
Stars: ✭ 331 (+417.19%)
Mutual labels:  scheduling, scheduled-jobs
coo
Schedule Twitter updates with easy
Stars: ✭ 44 (-31.25%)
Mutual labels:  scheduler, scheduling
joobq
JoobQ is a fast, efficient asynchronous reliable job queue and job scheduler library processing. Jobs are submitted to a job queue, where they reside until they are able to be scheduled to run in a computing environment.
Stars: ✭ 26 (-59.37%)
Mutual labels:  scheduler, tasks
Arpx
Automate and relate multiple processes.
Stars: ✭ 49 (-23.44%)
Mutual labels:  tasks, scheduling
Jobber
Jobber is lightweight, simple and distributed task scheduler.
Stars: ✭ 25 (-60.94%)
Mutual labels:  scheduler, scheduled-tasks
angular-gantt-schedule-timeline-calendar-example
Angular gantt-schedule-timeline-calendar usage example
Stars: ✭ 15 (-76.56%)
Mutual labels:  scheduler, tasks
Posterus
Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.
Stars: ✭ 536 (+737.5%)
Mutual labels:  async, scheduling

Build Status Coverage Status

Frame Scheduling

A tiny module which allows run a non-blocking layout many tasks.

  • Fast. Contains low overhead and optimized for running lots of tasks without drop fps
  • Small. 930 B (minified and gzipped). No dependencies. It uses Size Limit to control size.
  • Priority Separate tasks into different priorities. Try to complete priority tasks as quickly as possible.
  • Isomorphic. work in browser and node js.
import frameScheduling, { P_IMPORTANT } from 'frame-scheduling';

frameScheduling(() => { console.log('async task') });

Demo

Asynchronous running tasks in JavaScript based on requestAnimationFrame. Supports priority and interrupt execution every 16 milliseconds, to achieve 60fps.

Installation

# yarn
yarn add frame-scheduling

# npm
npm install --save frame-scheduling

Priority

import frameScheduling, { P_IMPORTANT, P_LOW } from 'frame-scheduling';
const result = [];

frameScheduling(() => { result.push('A') }, { priority: P_LOW })
frameScheduling(() => { result.push('B') })
frameScheduling(() => { result.push('C') }, { priority: P_IMPORTANT })
frameScheduling(() => { result.push('D') }, { priority: 1000 })

// after doing
console.log(result) // > ['D', 'C', 'B', 'A']

perform priority tasks first

framing

import frameScheduling from 'frame-scheduling';

frameScheduling(() => lightFunction()) // light < 1ms exec
frameScheduling(() => heavyFunction()) // heavy > 17ms exec
frameScheduling(() => heavyFunction2()) // heavy > 17ms exec
frameScheduling(() => lightFunction2()) // light < 1ms exec
frameScheduling(() => lightFunction3()) // light < 1ms exec

/*
Runs in frame
| lightFunction
| heavyFunction
    | heavyFunction2
        | lightFunction2
        | lightFunction3
*/

frame-scheduling aims to achieve 60 fps

Options

priority: number = 5

It is possible to set the priority of the function. If the function has a low priority, then each execution skip adds +1 to the priority. Thus, low-priority tasks, when something is done.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].