A demo application that extracts μformatted calendar data from a read only DOM and displays it on a calendar widget.

This is meant to let us test different optimization strategies.

It consists of several pieces:

hcalendar extractor
walks a DOM to extracts calendar data generating an RFC 2445 VCALENDAR. Will test the performance of our tamed DOM.
calendrical calculations.
Will test the performance of cajoled code by doing some algorithmic work involving lots of primitive operations and method calls.
layout
Defines a mapping between date ranges and pairs of grid cells, uses that to break events into "Chips" (graphical representations of part of an event on screen), and defines algorithms to minimize overlap between Chips by shrinking them along their minor axis.
calendar grid
displays a set of events. Will test HTML rendering and sanitization.

HCalendar Extractor

TODO(mikesamuel): write me

Calendrical Calculations

A javascript port of {@link http://code.google.com/p/google-rfc-2445/}. The main entry point is rrule-cajita.js which provides an interpreter for RRULEs and EXRULEs.

time-cajita.js includes a date implementation that will let us test operations on primitives, give us the opportunity to test which numeric operations can be proven safe, and try out inlining.

This is written in Cajita and should help in profiling the javascript cajita translator.

There are a number of supporting files, generators-cajita.js, filters-cajita.js, and conditions-cajita.js all represent different rule parts in RFC 2445 RRULEs.

There is a primitive timezone implementation in timezone-cajita.js.

Layout

layout-policy.js defines the mapping between date ranges and pairs of grid cells. layout.js uses that to break events (defined in event.js into chips see chip.js).

Finally overlap.js takes a group of Chips, and minimizes overlap between them. It makes extensive use of bitset.js which is another good candidate for optimization.

Calendar Grid

TODO(mikesamuel): write me