diff --git a/src/zmapServer/acedb/acedbServer.c b/src/zmapServer/acedb/acedbServer.c index 9d9b8cde620dbe27042777979830a8e35531ab2d..7cfc720dcab2bc5637feaf88c5ebabf29b632124 100755 --- a/src/zmapServer/acedb/acedbServer.c +++ b/src/zmapServer/acedb/acedbServer.c @@ -25,9 +25,9 @@ * Description: * Exported functions: See zmapServer.h * HISTORY: - * Last edited: Nov 7 13:56 2006 (rds) + * Last edited: Nov 7 17:05 2006 (edgrif) * Created: Wed Aug 6 15:46:38 2003 (edgrif) - * CVS info: $Id: acedbServer.c,v 1.74 2006-11-07 13:57:22 rds Exp $ + * CVS info: $Id: acedbServer.c,v 1.75 2006-11-07 17:05:19 edgrif Exp $ *------------------------------------------------------------------- */ @@ -360,9 +360,17 @@ static ZMapServerResponseType getFeatures(void *server_in, ZMapFeatureContext fe get_features.server->last_err_status = ACECONN_OK ; get_features.eachBlock = eachBlockSequenceRequest; + + + zMapPrintTimer(NULL, "In thread, getting features") ; + /* Fetch all the alignment blocks for all the sequences. */ g_datalist_foreach(&(feature_context->alignments), eachAlignment, (gpointer)&get_features) ; + zMapPrintTimer(NULL, "In thread, got features") ; + + + return get_features.result ; } @@ -623,6 +631,8 @@ static gboolean sequenceRequest(AcedbServer server, ZMapFeatureBlock feature_blo * the parent sequence if it is not required, this is actually quite fiddly to do in the acedb * code in a way that won't break zmap so we do it here. */ + zMapPrintTimer(NULL, "In thread, about to ask for features") ; + acedb_request = g_strdup_printf("gif seqget %s -coords %d %d %s %s ; " " %s " "seqfeatures -rawmethods -zmap %s", @@ -642,6 +652,7 @@ static gboolean sequenceRequest(AcedbServer server, ZMapFeatureBlock feature_blo gboolean inplace = TRUE ; char *first_error = NULL ; + zMapPrintTimer(NULL, "In thread, got features and about to parse into context") ; line_reader = zMapReadLineCreate((char *)reply, inplace) ; @@ -791,10 +802,7 @@ static gboolean sequenceRequest(AcedbServer server, ZMapFeatureBlock feature_blo g_free(reply) ; -#ifdef ED_G_NEVER_INCLUDE_THIS_CODE - printf("Finished parse features\n") ; -#endif /* ED_G_NEVER_INCLUDE_THIS_CODE */ - + zMapPrintTimer(NULL, "In thread, finished parsing features") ; } diff --git a/src/zmapThreads/zmapSlave.c b/src/zmapThreads/zmapSlave.c index b334c54289a570652ef220e0c880fa115e98d880..00b558ccf218dc6135e2984acc5503ca93a0a19e 100755 --- a/src/zmapThreads/zmapSlave.c +++ b/src/zmapThreads/zmapSlave.c @@ -28,9 +28,9 @@ * * Exported functions: See zmapConn_P.h * HISTORY: - * Last edited: Mar 10 08:27 2006 (rds) + * Last edited: Nov 7 16:53 2006 (edgrif) * Created: Thu Jul 24 14:37:26 2003 (edgrif) - * CVS info: $Id: zmapSlave.c,v 1.25 2006-03-10 08:27:36 rds Exp $ + * CVS info: $Id: zmapSlave.c,v 1.26 2006-11-07 17:05:20 edgrif Exp $ *------------------------------------------------------------------- */ @@ -136,10 +136,14 @@ void *zmapNewThread(void *thread_args) ZMAPTHREAD_DEBUG(("%lu: servicing request....\n", thread->thread_id)) ; + zMapPrintTimer(NULL, "In thread, calling handler function") ; + /* Call the registered slave handler function. */ slave_response = (*(thread->handler_func))(&(thread_cb->slave_data), request, &reply, &slave_error) ; + zMapPrintTimer(NULL, "In thread, returned from handler function") ; + /* The handling below is not now correct, if a call fails we need to kill the thread * we can't cope with dangling threads....we will need to set the thread_died flag */ diff --git a/src/zmapView/zmapView.c b/src/zmapView/zmapView.c index 3c3dfc1e926b259a9c0f6a56a38f4eb37c5aab98..fdd07b9ddff3b1a5bd95ccc06d4140a224a6d31b 100755 --- a/src/zmapView/zmapView.c +++ b/src/zmapView/zmapView.c @@ -25,9 +25,9 @@ * Description: * Exported functions: See ZMap/zmapView.h * HISTORY: - * Last edited: Oct 31 16:37 2006 (edgrif) + * Last edited: Nov 7 17:03 2006 (edgrif) * Created: Thu May 13 15:28:26 2004 (edgrif) - * CVS info: $Id: zmapView.c,v 1.87 2006-10-31 16:37:29 edgrif Exp $ + * CVS info: $Id: zmapView.c,v 1.88 2006-11-07 17:05:20 edgrif Exp $ *------------------------------------------------------------------- */ @@ -108,8 +108,6 @@ static void addAlignments(ZMapFeatureContext context) ; - - /* These callback routines are static because they are set just once for the lifetime of the * process. */ @@ -205,6 +203,8 @@ void zMapViewSetupNavigator(ZMapView zmap_view, GtkWidget *canvas_widget) return ; } + + /* Connect a View to its databases via threads, at this point the View is blank and waiting * to be called to load some data. */ gboolean zMapViewConnect(ZMapView zmap_view, char *config_str) @@ -212,6 +212,7 @@ gboolean zMapViewConnect(ZMapView zmap_view, char *config_str) gboolean result = TRUE ; ZMapConfigStanzaSet server_list = NULL ; + if (zmap_view->state != ZMAPVIEW_INIT) { /* Probably we should indicate to caller what the problem was here.... @@ -223,6 +224,9 @@ gboolean zMapViewConnect(ZMapView zmap_view, char *config_str) ZMapConfig config ; char *config_file = NULL ; + zMapStartTimer(ZMAP_GLOBAL_TIMER) ; + zMapPrintTimer(NULL, "Open connection") ; + zmapViewBusy(zmap_view, TRUE) ; /* There is some redundancy of state here as the below code actually does a connect @@ -1794,6 +1798,10 @@ static void getFeatures(ZMapView zmap_view, ZMapServerReqGetFeatures feature_req { ZMapFeatureContext new_features = NULL, diff_context = NULL ; + + zMapPrintTimer(NULL, "Got Features from Thread") ; + + /* Merge new data with existing data (if any). */ new_features = feature_req->feature_context_out ; @@ -1804,6 +1812,8 @@ static void getFeatures(ZMapView zmap_view, ZMapServerReqGetFeatures feature_req /* We should free the new_features context here....actually better * would to have a "free" flag on the above merge call. */ + zMapPrintTimer(NULL, "Merged Features into context and about to display") ; + /* Signal the ZMap that there is work to be done. */ displayDataWindows(zmap_view, zmap_view->features, diff_context) ; diff --git a/src/zmapWindow/zmapWindowDrawFeatures.c b/src/zmapWindow/zmapWindowDrawFeatures.c index 0182539f9c9da68e6a39698afc1507efc0f5b0e5..e2ce621f894ffb7aa6a9ff59afb74622f7202d74 100755 --- a/src/zmapWindow/zmapWindowDrawFeatures.c +++ b/src/zmapWindow/zmapWindowDrawFeatures.c @@ -26,9 +26,9 @@ * * Exported functions: * HISTORY: - * Last edited: Oct 13 14:07 2006 (rds) + * Last edited: Nov 7 16:58 2006 (edgrif) * Created: Thu Jul 29 10:45:00 2004 (rnc) - * CVS info: $Id: zmapWindowDrawFeatures.c,v 1.154 2006-10-18 15:20:23 rds Exp $ + * CVS info: $Id: zmapWindowDrawFeatures.c,v 1.155 2006-11-07 17:05:19 edgrif Exp $ *------------------------------------------------------------------- */ @@ -151,6 +151,10 @@ static void destroyFeaturesList(gpointer data) ; static void printFeatureSet(GQuark key_id, gpointer data, gpointer user_data) ; +extern GTimer *view_timer_G ; + + + /* Drawing coordinates: PLEASE READ THIS BEFORE YOU START MESSING ABOUT WITH ANYTHING... * * It seems that item coordinates are _not_ specified in absolute world coordinates but @@ -211,6 +215,11 @@ void zmapWindowDrawFeatures(ZMapWindow window, double ix1, ix2, iy1, iy2; /* initial root_group coords */ double fx1, fx2, fy1, fy2; /* final root_group coords */ + + + zMapPrintTimer(NULL, "About to create canvas features") ; + + zMapAssert(window && full_context && diff_context) ; window->item_factory = zmapWindowFToIFactoryOpen(window->context_to_item, window->long_items); @@ -366,6 +375,9 @@ void zmapWindowDrawFeatures(ZMapWindow window, zmapWindowFToIFactoryClose(window->item_factory); + + zMapPrintTimer(NULL, "Finished creating canvas features") ; + return ; }