r2 - 19 Oct 2005 - 15:38:26 - BobbyRulloYou are here: OSAF >  Journal Web  >  BobbyRulloNotes > 20051019
Scooby is WAY slow right now, so I am trying to get to the bottom of things.

What I notice right away is that the screen takes about 20 seconds to do the initial load with only 21 events! Yikes!

Here is a rough flow of the exection chain:

  1. Client - HTML page loads
  2. Client - pageCal.init() -
    1. Client - pageCal.loadEvents()
      1. Client - scoob.getEvents() - the call to the scooby service
        1. Server - getEvents() - the call on the server side
        2. Client - marshall
        3. Client - convertObjects() - converts hashes to proper prototypes
      2. Client - insertCalEvent - called once for each event

The first thing I did was time how long the method was taking on the server:

2005-10-19 16:33:10,036 DEBUG [Timer] END method 'run'(), thread 'http-8079-Processor25',  elapsedTime: 143ms

Only 143ms - that doesn't seem to be the problem.

Let's check pageCal.loadEvents():

10/19/2005 - 16:55:55   DEBUG   End function 'loadEvents'; elapsedTime: 16645ms

Yikes. That's not good. Let's dig deeper and check out just the service method:

10/19/2005 - 16:55:49   DEBUG   End function 'getEvents'; elapsedTime: 9148ms

Well, That's a big chunk of the problem - about 55% of the problem is in getting the events from the server. The remaining 45% is drawing them it seems. Since I'm not so much the GUI guy, I'll start out dealing with getEvents();

Here it is broken down again, with a little more detail:

1. Client - scoob.getEvents() - the call to the scooby service - TIME: 9148ms

  1. Server - getEvents() - this is actually a wrapper around a JSON call:
    1. the JSON Call
      1. get stuff from the server
      2. marshall it
    2. convertObjects()

Let's see where the bottleneck(s) is(are). First the actual JSON with no wrapping:

10/19/2005 - 18:58:53   DEBUG   End function 'getEvents'; elapsedTime: 447ms

Suprising! That's not bad at all. How about convertObjects()?

After adding some logging I get 11 seconds! Heh, that makes no sense, since it's longer than getEvents().

Maybe the problem is the logging....

Sure enough it drops down to two seconds after logging statements are removed.

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.