[Aptitude-svn-commit] r3601 - in branches/aptitude-0.3/aptitude: . doc/en src

Daniel Burrows dburrows@costa.debian.org
Sun Jul 3 22:08:51 UTC 2005


Author: dburrows
Date: Sun Jul  3 22:08:46 2005
New Revision: 3601

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/doc/en/aptitude.xml
   branches/aptitude-0.3/aptitude/src/download.cc
Log:
Drop the frequency of screen updates while downloading a bit.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sun Jul  3 22:08:46 2005
@@ -1,4 +1,10 @@
 2005-07-03  Daniel Burrows  <dburrows@debian.org>
+
+	* doc/en/aptitude.xml, src/download.cc:
+
+	  Drop the frequency of screen updates by an order of magnitude,
+	  to quit hogging the CPU.
+
 	* src/mine/cmine.cc:
 
 	  Add and use support for adjusting the coloration of uncovered

Modified: branches/aptitude-0.3/aptitude/doc/en/aptitude.xml
==============================================================================
--- branches/aptitude-0.3/aptitude/doc/en/aptitude.xml	(original)
+++ branches/aptitude-0.3/aptitude/doc/en/aptitude.xml	Sun Jul  3 22:08:46 2005
@@ -7379,6 +7379,21 @@
 	      </seg>
 	    </seglistitem>
 
+	    <seglistitem id='configDownload-Poll-Interval'>
+	      <seg><literal>Aptitude::UI::Download-Poll-Interval</literal></seg>
+
+	      <seg><literal>100000</literal></seg>
+
+	      <seg>
+		This option gives the interval in milliseconds at
+		which the user interface will update its display and
+		poll for new input while a download is being
+		performed.  Smaller values will make the program more
+		responsive, but will consume a larger amount of CPU
+		time.
+	      </seg>
+	    </seglistitem>
+
 	    <seglistitem id='configExit-On-Last-Close'>
 	      <seg><literal>Aptitude::UI::Exit-On-Last-Close'</literal></seg>
 

Modified: branches/aptitude-0.3/aptitude/src/download.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/download.cc	Sun Jul  3 22:08:46 2005
@@ -127,7 +127,7 @@
   sigaddset(&signals, SIGWINCH);
   sigprocmask(SIG_UNBLOCK, &signals, &oldsigs);
 
-  switch(fetcher.Run(5000))
+  switch(fetcher.Run(aptcfg->FindI(PACKAGE "::UI::Download-Poll-Interval", 100000)))
     // At this point the widget should be deleted
     {
     case pkgAcquire::Failed:
@@ -381,7 +381,7 @@
     {
       sigprocmask(SIG_SETMASK, &oldsigs, &signals);
 
-      pkgAcquire::RunResult res=fetcher.Run(5000);
+      pkgAcquire::RunResult res=fetcher.Run(aptcfg->FindI(PACKAGE "::UI::Download-Poll-Interval", 100000));
       if(res!=pkgAcquire::Continue || abortable.get_aborted())
 	// We failed or were cancelled
 	{




More information about the Aptitude-svn-commit mailing list