Git Product home page Git Product logo

apostate's People

Contributors

zebulonj avatar

Watchers

 avatar  avatar

Forkers

mirandadamara

apostate's Issues

Optimized Rendering

The goal of this optimization is to ensure that rendering is not triggered more often than once per animation frame, regardless of the timing of signals and action execution.

Per-Frame Processing is Too Heavy

The current implementation of per-frame processing, which executes on every animation frame regardless of whether there is a state change or pending animations, puts too much load on the processor.

Improve Scheduling

There's a need for multiple scheduling queues. Certain user interactions require immediate (at least current thread) execution, while there are other contexts where it would be nice to aggregate or delay updates (e.g., to user the animation frame).

Support Utility Injection

import API from 'api';

engine.inject({ api: API({ url_root: '/api' }) });

In this example, API( ... ) returns a factory function that is used by Apostate to prepare the utility (an API in this example) for use within the engine. The prepared utility is exposed to each action like so:

function fetch( state, params, { api } ) {
  return api.activity.list( params );
}

function load( state, params ) {
  state.set( 'activity', params );
}

Prioritize Signals

Allow prioritization of signals. Two levels: normal and background. Background signals should only be processed after all pending normal signals are processed. For example, we want user input to be processed immediately, when when tiles are loading asynchronously.

There are some risks of signals being processing in an inappropriate order, if this is not used carefully. Background priority should only be used for signals for which the order of processing does not matter.

Related to #10.

Scheduling

I want to be explicit about how dispatched signals are scheduled for processing. This is particularly important in the context of cascading signals, where a secondary signal is generated from within an action (triggered by a prior signal).

In the case of secondary signals, processing should be queued for after completion of the current and any pending signals.

In the case of primary signals (triggered by user action), I'm less certain but inclined to give the same treatment.

This should (a) allow easier reasoning about the timing of actions and (b) improve performance by breaking up otherwise long running processes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.