npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

igniter-core

v0.0.0

Published

Intelligent Work Distribution for JavaScript Applications

Downloads

33

Readme

Igniter

npm version Build Status Code Climate

Intelligent Work Distribution for JavaScript Applications.

About

Igniter allows you to schedule work in ways that best align with the browser's render cycle, minimizing forced layouts, reducing instances of duplicated work, and giving us highly granular timing and order of operation guarantees.

Tasks in Igniter are scheduled into a Queue within a Frame either directly or via a Timer, a Deadline, or a Buffer.

Frames

Types of work are divided into Event, Layout, Measure and Idle. frames. These frames have unique timing guarantees and purposed queues.

The purposed queues are emptied in the order they are specified below. Emptying is linear, it will not cycle back, but appending to an active queue is valid.

All frames have a cleanup queue at the end, which will empty anything that's been scheduled for cleanup at that point.

There is also a specialized next queue which flushes with an as soon as possible policy and is similar in nature to requestAnimationFrame in that you always schedule into the upcoming flush, unless you are currently flushing the next queue, in which case you schedule into the next next flush.

EventFrame

  • sync // do these things first
  • actions // do these things second
  • cleanup

LayoutFrame

  • render
  • afterRender // deprecated, here for legacy backburner support
  • destroy // deprecated, here for legacy backburner support
  • cleanup

MeasureFrame

  • measure // read DOM properties here
  • affect // edit DOM properties here
  • cleanup

IdleFrame

  • idle // work that's just less important, but more aggresive idle than ric
  • collect // work that will result in a major GC event (emptying a large array / releasing a large DOM tree)
  • cleanup

Buffers

Buffers allow you do create a "yielding" task that captures scheduled work and delivers it to the appropriate Frame and Queue only once that task is complete. Buffers can accept deadlines, with a specialized option of finishBeforeRender: true being available.

Deadlines

Render Metadata

Polyfills

This library functionally polyfills requestAnimationFrame for IE9. It polyfills MicroTasks for IE9 and IE10. It polyfills requestIdleCallback for non-chrome browsers.

Using with external libs that use requestAnimationFrame

When using igniter with a library in which you do not control the scheduling of asynchronous tasks, it is best if you can supply that lib our customized raf.

import {
  requestAnimationFrame,
  cancelAnimationFrame
} from 'igniter/raf';

...

// override external lib raf usage