[Gpredict-svn] SF.net SVN: gpredict:[898] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-09-19 12:01:10
|
Revision: 898
http://gpredict.svn.sourceforge.net/gpredict/?rev=898&view=rev
Author: aa1vs
Date: 2011-09-19 12:00:59 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
Speed up tle-update by updating the gui less frequently.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-18 14:09:26 UTC (rev 897)
+++ trunk/ChangeLog 2011-09-19 12:00:59 UTC (rev 898)
@@ -1,6 +1,13 @@
2011-09-18 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
+ * src/tle-update.c
+ Speed up tle-update by updating the gui less frequently.
+
+
+2011-09-18 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
* src/qth-data.c
Remove error message if latitude, longitude, or altitude is zero.
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-09-18 14:09:26 UTC (rev 897)
+++ trunk/src/tle-update.c 2011-09-19 12:00:59 UTC (rev 898)
@@ -326,18 +326,28 @@
}
- /* Force the drawing queue to be processed otherwise there will
- not be any visual feedback, ie. frozen GUI
- - see Gtk+ FAQ http://www.gtk.org/faq/#AEN602
- */
- while (g_main_context_iteration (NULL, FALSE));
-
- /* give user a chance to follow progress */
- g_usleep (G_USEC_PER_SEC / 1000);
+ /* update the gui only every so often to speed up the process */
+ /* 47 was selected empirically to balance the update looking smooth but not take too much time. */
+ /* it also tumbles all digits in the numbers so that there is no obvious pattern. */
+ /* on a developer machine this improved an update from 5 minutes to under 20 seconds. */
+ if (total%47 == 0) {
+ /* Force the drawing queue to be processed otherwise there will
+ not be any visual feedback, ie. frozen GUI
+ - see Gtk+ FAQ http://www.gtk.org/faq/#AEN602
+ */
+ while (g_main_context_iteration (NULL, FALSE));
+
+ /* give user a chance to follow progress */
+ g_usleep (G_USEC_PER_SEC / 1000);
+ }
}
}
}
+
+ /* force gui update */
+ while (g_main_context_iteration (NULL, FALSE));
+
/* close directory handle */
g_dir_close (loc_dir);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|