mozilla-b2g/gaia — pull request #26511 by millermedeiros (2014-11-27 04:19:48+00:00)
Title: Bug 1088381- [Calendar] simplify time controller logic

this work depends on #25948 so **please don't merge it!!** I still need to rebase it after it gets r+

### overview

simplified the timeController logic by moving all the busytime/event cache into the dayObserver while also reducing the amount of DB queries, improving the startup performance by around 250ms and also improved the performance while switching between months.

the main difference of the dayObserver from the old timeController is that we always listen to busytimes/event changes for a single day and don't need to worry about different *scales*.

the new cache logic is still more complex than I wanted it to be (specially because of the link between `event <==> busytime`) but it removed the need of the `IntervalTree`, reduced the amount of LOC drastically (631 additions and 1,968 deletions) and improved the app performance; so I think it was a good improvement.