Bug 181137 - x11-clocks/wmfuzzy updates far too frequently, chewing up CPU
Summary: x11-clocks/wmfuzzy updates far too frequently, chewing up CPU
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-08 10:30 UTC by Marcus Reid
Modified: 2014-02-25 23:51 UTC (History)
0 users

See Also:


Attachments
file.diff (207 bytes, patch)
2013-08-08 10:30 UTC, Marcus Reid
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Reid 2013-08-08 10:30:01 UTC
Since the display actually changes every five minutes or so, sleeping only 100 usec and checking the time 10,000 per second is overkill.  The fix is a very simple patch.

Fix: Patch attached with submission follows:
Comment 1 John Marino freebsd_committer freebsd_triage 2014-02-25 23:24:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marino

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-02-25 23:49:25 UTC
Author: marino
Date: Tue Feb 25 23:49:18 2014
New Revision: 346080
URL: http://svnweb.freebsd.org/changeset/ports/346080
QAT: https://qat.redports.org/buildarchive/r346080/

Log:
  x11-clocks/wmfuzzy: Update at 1 hertz instead of 10 khz
  
  This fuzzy clock display only changes approximately every 5 minutes, so
  it's crazy that it internally updates every 10 microseconds.  Save CPU
  and let it sleep a second at a time.
  
  While here, remove indefinite article from comment, remove unnecessary
  NOPORTDOCS check, and indicate GPLv2 license.
  
  PR:		ports/181137
  Submitted-by:	Marcus Reid

Added:
  head/x11-clocks/wmfuzzy/files/patch-xdisplay.c   (contents, props changed)
Modified:
  head/x11-clocks/wmfuzzy/Makefile

Modified: head/x11-clocks/wmfuzzy/Makefile
==============================================================================
--- head/x11-clocks/wmfuzzy/Makefile	Tue Feb 25 23:04:06 2014	(r346079)
+++ head/x11-clocks/wmfuzzy/Makefile	Tue Feb 25 23:49:18 2014	(r346080)
@@ -3,13 +3,15 @@
 
 PORTNAME=	wmfuzzy
 PORTVERSION=	0.7.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11-clocks windowmaker
 MASTER_SITES=	http://www.manicai.net/comp/wmfuzzy/assets/
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A fuzzy clock WindowMaker dockapp
+COMMENT=	Fuzzy clock WindowMaker dockapp
+
+LICENSE=	GPLv2
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
 
@@ -20,9 +22,7 @@ PLIST_FILES=	bin/wmfuzzy
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/wmfuzzy ${STAGEDIR}${PREFIX}/bin
-.if !defined(NOPORTDOCS)
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/../README ${STAGEDIR}${DOCSDIR}
-.endif
 
 .include <bsd.port.mk>

Added: head/x11-clocks/wmfuzzy/files/patch-xdisplay.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-clocks/wmfuzzy/files/patch-xdisplay.c	Tue Feb 25 23:49:18 2014	(r346080)
@@ -0,0 +1,11 @@
+--- xdisplay.c.orig	2004-11-23 21:32:48.000000000 +0000
++++ xdisplay.c
+@@ -383,7 +383,7 @@ void display_main_loop(void)
+       x_handle_event(&event);
+     }
+ 
+-    usleep(100);
++    sleep(1);
+   }
+ }
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 John Marino freebsd_committer freebsd_triage 2014-02-25 23:51:05 UTC
State Changed
From-To: open->closed

Committed. Thanks!