I've made some patches against the timeline trunk that are mostly
focussed on performance of loading json and scrolling when the number
of events is very high (5000+). I profiled in both FF3/firebug 1.3 and
in a recent webkit nightly. I'll be citing figures from FF3/firebug.
date-time.js_optimizeNullDates.diff
This change makes a huge difference in json load times when there are
a lot of single date events. The parseIso8601DateTime function was
previously taking 60-70% of load time, and with this patch takes less
than 1%. This patch is far and away the most important of the one's
I'm providing.
compact-painter.js_cacheDiv.diff
original-painter.js_cacheDiv.diff
overview-painter.js_cacheDiv.diff
These patches modify the painters to pre-cache some of the event divs
and then uses cloneNode. Depending on the function, it improves
performance of those calls by 3-10%. Not the most amazing improvement
ever, but it is something.
band.js_cacheViewWidth.diff
Optimizes band.js's getViewWidth function by caching the width in a
member variable instead of doing dom lookups. When scrolling, this
function is responsible for 90% of reported runtime. With this patch,
it goes to less than 1%.
compact-painter.js_minPixel.diff
original-painter.js_minPixel.diff
overview-painter.js_minPixel.diff
These are the only patches that are not performance related. They
modify the painters to guarantee that all tape divs are at least one
pixel wide. This solves a problem I was having where some events were
invisible at certain zoom levels.
Additionally, I've included a python script that I wrote to generate
my test json files and the test.html file I was using with them.
This test uses JSON data.
It demonstrates use of various event attributes color, textColor, tapeImage, and tapeRepeat. Details
Test numbers:
Timeline version .
Stripe courtesy of Stripe Generator.