Jay's home page · Jay's Agenda page · Agenda PIM apps

The Schedule (datebook) application

(Update 2001.08.28: Ulrich Pfeifer has posted a patch to the Schedule app source code to the agenda-dev mailing list that hugely speeds up the month view - although not the page view as far as I can tell. It still feels just a bit sluggish, but it's within the range of a Palm, and it's really usable. He improved the speed by changing code that was finding bit-slices by doing double-precision exponentiation to shifts, and by caching the values of repeated calls to localtime(), used during date comparisons. He had also previously posted patches that made an even bigger difference in the speed, at the cost of ignoring daylight savings time when checking whether an event was on the current day or not, so appointments near midnight might appear on the wrong date. There's probably still a fair amount of room for improvement without sacrificing correctness. As of 2001.08.28, you can get a copy of Ulrich's schedule binary linked for SNOW 1.1.X romdisks at http://www.wait.de/agenda/schedule. I'm sure these fixes will find their way into the next official romdisk from Agenda Computing.)

The Schedule application is much weaker than the corresponding PalmOS app. (And it's incomparably weaker than DateBk4, which is what I'm used to using on PalmOS. DateBk4 is an utterly fine piece of software.) For one thing, the Schedule application provides fewer views on your calendar than Datebook does. The PalmOS Datebook app lets you see a weekly view as well as a monthly view and a daily view. And really, the Agenda's monthly view isn't really a view of your schedule so much as a navigation panel; it tells you (by underlining and displaying dates in bold) whether or not you have an appointment on a particular day, but it gives you no sense of how many appointments you have or when they are as the PalmOS app does. That's one bit of information per day.

The Schedule application does provide a compact list view, which starts with today's appointments and shows you as many as will fit on the screen (which might be a week's worth if you don't have a lot of appointments). However, it's very slow.

That actually brings me to the major complaint I have about Schedule - it's just abysmally, almost unusably slow if you have a realistic number of appointments. (At least for me. I have a lot of repeating appointments, and I have a suspicion those may be what are killing it.) It takes me about two seconds to go backwards or forwards a day in the daily view. It takes me about twenty to forty seconds just to bring up the month view! And that's the only (straightforward) way to go directly to another date without traversing all the days in between! And then if I need to go forward a couple months to find the date I want, it's another twenty to forty seconds per month before I can tap on the date I want. So if I want to jot down an appointment (or just check to see if I have any conflicts on a particular date) later in the year, it could easily take me more than a minute just to get to the right date! I recently found a workaround (described below), but it's extremely non-intuitive, and Agenda is really going to have to fix this if people are going to actually use the Schedule app.

(Update 2001.07.19: I just tried the Schedule app with a recent SNOW romdisk from http://www.desertscenes.net/agenda/snow/. In general, SNOW speeds up the Agenda quite a bit. However, it has very little effect on the speed of Schedule with my appointments. So while you can expect that SNOW romdisks will make the Agenda in general faster, they don't have a whole lot of effect on the really slow parts of the Schedule app.)

Why is it so slow? How can it be fixed?

(My guesses here were at least partially wrong; see above at the top find out this document.)

It seems to me that the Schedule app is so slow at least partly because of its handling of repeating events. I haven't taken a thorough look at the source code, but I suspect that it may be processing all the repeating events to see if any of them fall on the current date for each date it cares about. To display a new date in the daily view, that would involve a linear search of the repeating events - not the most efficient thing imaginable, but not ridiculous. But for the monthly vew, that would mean that each repeating event would need to be processed 28 to 31 times (for a net result of just one bit of information displayed per date), and that would account for the monthly view being so incredibly slow. If my guess is correct, it ought to be possible to improve that tremendously by caching the information from one pass through the repeating events. That would mean that viewing a single date would take a couple seconds, and bringing up the month view would take three or four seconds. That's still way to slow, but it would be enough that people wouldn't yearn for a paper day-timer :-), and I'm sure there are other speed improvements that can be made.

Assuming my guess about what's going on here is correct, a simpler, quick-and-dirty fix would be to modify the month display code so as not to highlight dates with an appointment. It looks like you can do this by commenting out three lines (starting at line 300) in the Multi_View::update_month_view method in aps-schedule-1.0/view.cxx as indicated:

void Multi_View::update_month_view() {
//      int flags[31];
//      get_events_flags(flags, cal_date());
//      event_calendar->day_flags(flags);
        static char tmp[64];
        sprintf(tmp, "%s %d", _(month_name[event_calendar->month() - 1]),
                event_calendar->year());
        caption->label(tmp);
        caption->redraw();
        event_calendar->update();
        time_t t = time(NULL);
        current_date = make_time(t, event_calendar->day(),
                event_calendar->month() - 1, event_calendar->year() - 1900);
}
I've confirmed under Linux/Intel that these changes stop the month view from boldfacing and underlining dates with appointments, but I haven't yet gotten it cross-compiled for the Agenda, so I can't check whether it actually makes the sort of speed difference I'd expect. Also, the binary I produce occasionally segfaults, so I seem to be breaking something else as well.

The right solution long-term, in my opinion, would be a `Month' entry that produces the current month view (ideally with more useful information per date, and with a progress bar to let you know that it's not just hung when it takes the better part of a minute to display a month), and also a `Go...' entry that just pops up a bare-bones date picker - basically, the month view without the event highlighting. The `Go...' would be what you'd normally use for navigation, and the `Month' would be used to actually get an overview of your month's appointments (assuming that's useful to anybody - perhaps there are people who average fewer than one appointment a day, but I don't know any :-) Perhaps the Agenda's greyscale capability could be used by displaying dates in shades of grey depending on how many appointments they had. Something like the Palm's morning/afternoon/evening appointment display would also be useful. Personally, I love DateBk3's ability to use icons to remind you what particular events you have on a particular date in its month view.)

A workaround

There is a workaround that lets you move from one date to another without either loading the full incredibly slow month view, or traversing each intervening date at a second or two each. When you create a new appointment, there's a button that lets you change the date. And if you change the date, you're left on the new date. So to go from June 24 to December 5, tap `New' to create a new appointment on June 24, type something into the `Description' field, tap the current date to change it, move to December 5 and tap Done, and then delete the bogus appointment you've just created on December 5. Lots of tapping, but much faster than doing it with the month view. (You don't need to bother with this if you use Ulrich's fixed binary, listed above.)

No alarms! (this section is obsolete)

One of the main things people use a date book PIM application for is to remind them of things, especially things they would otherwise forget. So you want to be able to associate an alarm with an event and have your PDA beep or ring or vibrate or give you an electric shock to remind you that the event is coming up. (Of course, you probably don't want alarms on all events.) The Agenda doesn't yet support this functionality. I gather they're having some sort of OS-level problem having the Agenda wake up to ring its alarm when its suspended (as it normally is, sitting in your pocket). I believe the Agenda developers are working on that. In the meantime, don't count on your Agenda waking you up. :-) (Update 2001.08.28: Recent romdisks with recent kernels fix this problem and provide alarm support. However, some people have had power-consumption problems - batteries draining too quickly - when using them. Also, you get to choose among four extremely silly tinny little tunes for your alarm sound, there's nothing that's just a respectable-sounding beep. The former problem is being worked on; the latter problem will no doubt be fixed if Agenda want their products to be taken seriously in offices and meeting rooms, but seems not as high a priority at the moment - although it's certainly enough to prevent me from using alarms. :-)

Screenshots

Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7
Schedule (Today) Schedule (Month) Schedule (Journals) Schedule (Page)
Screenshot 8 Screenshot 9 Screenshot 10
Schedule Edit Datebook time set (PalmOS) DateBk4 time set

Bugs and annoyances

(These are little things, besides the huge problem with slow navigation above, and the problems with alarms.)
Jay's home page · Jay's Agenda page · Agenda PIM apps
Last modified 2001.08.28.