Overview
| Artifact ID: | 6a879813397986a483893430d862ca13101fb137 |
|---|---|
| Ticket: | 2905784fffffffffffffffffffffffffffffffff
Sync [after] works too hard |
| User & Date: | ferrieux on 2010-10-29 23:36:39 |
Changes
- icomment:
Attaching the final patch. Care is taken to never undershoot, using a ceiling() approach when rounding usecs do msecs in time differences. Now a loop of {after 1} consumes < 0.1% CPU instead of 50%. Also, the total syscall budget is much reduced: one select() and three gettimeofday() only for a small [after]. Cost in accuracy: % time {after 1} 1000 1060.089 microseconds per iteration % time {after 2} 1000 2061.111 microseconds per iteration % time {after 3} 1000 3062.367 microseconds per iteration % time {after 100} 10 100235.0 microseconds per iteration % time {after 10000} 1 10002067 microseconds per iteration - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"