Issues.00347 - lordmundi/wikidoctest GitHub Wiki
00347: make sleep time between non-updating frames configurable
Summary: make sleep time between non-updating frames configurable
Created: 2011–05–10 14:42
Status: Released
Category: Request
From: frankie
Version: 2.1
Released_In: 2.2
Description:
currently, if there is nothing to redraw, and no tcl events were processed in the current frame, DOUG will schedule a sleep of 10 ms. Services that need low latency when running inside of a non-visual DOUG (which never have redraws) therefore cannot respond faster than 10 ms.
This is a request to do two things:
- Make the sleep time configurable via a tcl command (a subcommand to doug.cmd I would presume). I would prefer this to be specified in microseconds (for platforms that don't support microsecond resolution, DOUG can internally round up to nearest millisecond). A sleep time of 0 should cause no sleeping to occur.
- Change the default sleep time to something much lower. Perhaps 1 ms.
Comments
brad May 10, 2011, at 04:28 PM There is now a new command line option to doug "-idle_time " that can be specifed at startup as well as two new Tcl commands "doug.cmd idle_time " which a script can use to change the idle_time settings and "doug.cmd get_idle_time" which returns the current idle_time setting. Oh yea and the default idle_time has been specified as 1000 microseconds.
frankie May 10, 2011, at 05:26 PM: This is great. For my own notes, setting a sleep time of 0 does result in 100% CPU usage as expected, and the response of the web server yields diminishing returns around 100us (8 or 9% CPU usage on my Core i7 960), so there isn't much reason to go below that. The default of 1000us is almost as fast and is great as a default.
Associated Commits
| commit | 6d248b21215e3ce5b546cd9e621aee1072ea9533
link6 |
||
| Author: | Brad Bell
|
| Date: | Tue May 10 16:23:42 2011 -0500
|
| Message: | [@Issue 00347: modified the idle_time option to be in microseconds instead of
milliseconds @] |
Affected Files:
bin_Darwin/doug | Bin 1846980 -> 1847040 bytes
bin_Linux_FC3/doug | Bin 678803 -> 678869 bytes
bin_Win32/doug.exe | Bin 1819190 -> 1819190 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
| commit | 8f4c49f20240b219db6ebd725e4089d1a886fbfd
link7 |
||
| Author: | Brad Bell
|
| Date: | Tue May 10 16:19:40 2011 -0500
|
| Message: | [@Issue 00347: added doug command line option '-idle_time <milliseconds' and tcl
command 'doug.cmd idle_time ' @] |
Affected Files:
bin_Darwin/doug | Bin 1846932 -> 1846980 bytes
bin_Linux_FC3/doug | Bin 678353 -> 678803 bytes
bin_Win32/doug.exe | Bin 1818649 -> 1819190 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
| commit | 266dc445c8ab07d85f3a619ef8e8b23522923de5
link8 |
||
| Author: | Brad Bell
|
| Date: | Tue May 10 16:24:53 2011 -0500
|
| Message: | [@EDGE Issue 00347: made the idle_time be specified in microseconds
@] |
Affected Files:
src/doug/doug.c | 14 +++++++++±---
1 file changed, 10 insertions(+), 4 deletions(-)
| commit | f77848b24643bf0c73c1eec1d1305aecc2a4e431
link9 |
||
| Author: | Brad Bell
|
| Date: | Tue May 10 16:17:39 2011 -0500
|
| Message: | [@EDGE Issue 00347: added command line option '-idle_time milliseconds' and tcl
command 'doug.cmd idle_time ' @] |
Affected Files:
src/doug/doug.c | 24 +++++++++++++++++++++±-
1 file changed, 22 insertions(+), 2 deletions(-)