summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* revert dual lists (relative/absolute) back to single list (because of better ↵sebres2017-07-031-109/+63
| | | | handling, a bit faster, etc.)
* amend with review sebres2017-07-032-19/+56
|
* don't use tolerance in vwait, because of dual usage, it causes canceling of ↵sebres2017-07-031-8/+2
| | | | wait before end-time, on small timeout values (like 0.5, etc.)
* interim commit: trying to resolve time-freezes with new facilities ↵sebres2017-07-037-270/+362
| | | | timeJump/timeJumpEpoch
* interim commit: trying to resolve time-freezes with new facilities ↵sebres2017-07-035-194/+454
| | | | timeJump/timeJumpEpoch
* call TclWinResetTimerResolution at end of sleep resp. wait for event (no ↵sebres2017-07-031-10/+18
| | | | calibration thread anymore)
* win: calibration cycle completely rewritten (no calibration thread needed, ↵sebres2017-07-032-613/+222
| | | | | | soft drifts within 250ms intervals, fewer discrepancy and fewer virtual time gradation, etc). todo: implement resetting timer-resolution to original value (without calibration thread now).
* interim commit: amend with optimization sebres2017-07-031-53/+159
|
* interim commit: time-drift backwards fix... (try to resolve using counter ↵sebres2017-07-031-168/+187
| | | | variance + frequency factor)
* interim commit: time-drift backwards fix... (try to resolve using frequency ↵sebres2017-07-031-222/+86
| | | | factor)
* interim commit: time-drift backwards fix... sebres2017-07-031-27/+78
|
* interim commit: try to fix time-drift backwards (calibration? something ↵sebres2017-07-033-45/+80
| | | | else?)...
* interim commit: try to fix time-drift backwards (too long offset after ↵sebres2017-07-033-143/+260
| | | | calibration? something else?)...
* extended performance test-cases (test-nrt-capability): RTS-near sleeps with ↵sebres2017-07-031-0/+12
| | | | very brief sleep-time.
* chanio.test: optimize several tests cases running too long (shorten unwanted ↵sebres2017-07-031-6/+6
| | | | large sleeps)
* bug fix: prevent setting of negative block-time by too few initial ↵sebres2017-07-031-6/+8
| | | | wait-time, that may expire immediately (for example `vwait 0.0001 test`).
* extended performance test-cases (test-nrt-capability): covering of brief ↵sebres2017-07-031-0/+29
| | | | wait-times and other RTS-near constructs.
* [unix] optimized Tcl_WaitForEvent similar to windows changes (makes Tcl for ↵sebres2017-07-032-89/+226
| | | | | | | | *nix more "RTS" resp. NRT-capable): - more precise waiting now (e.g. still microseconds by time up to 0.005 ms), important since after/vwait accepting microseconds (double); - avoids too long waiting on *nix wait/sleep primitives, e. g. by `timerate {vwait 0 a}` - 1.5µs now vs. 31.9µs before; - extended with new internal function TclpSleep (in contrast to Tcl_Sleep accept Tcl_Time, so microseconds);
* added performance test-cases to cover timer-events speed resp. event-driven ↵sebres2017-07-032-0/+270
| | | | | | tcl-handling (cherry-picked and back-ported from tclSE-9)
* fix sporadic errors on some fast cpu/platforms (because bgerror executed in ↵sebres2017-07-031-8/+15
| | | | background and it is an idle-event, give enough time to process it (resp. wait until last idle event is done);
* make timer test-case more precise and time-independent, ignores short ↵sebres2017-07-031-138/+119
| | | | | | tolerance (deviation by waiting); several time-independent test-cases optimized (wait shorter now) + some new cases to cover more situations.
* after info, after cancel: compare interpreter of the timer-events by direct ↵sebres2017-07-032-2/+28
| | | | retrieving via internal representation (ignore foreign events), test cases extended.
* resolved some warnings / fixed unix resp. x64 compilation sebres2017-07-033-6/+5
|
* code review + better usage of the waiting tolerance (fewer CPU-greedy now, ↵sebres2017-07-034-34/+95
| | | | | | | avoid busy-wait if the rest of wait-time too small and can be neglected); TMR_RES_TOLERANCE can be defined to use wait-tolerance on *nix platforms (currently windows only as relation resp. deviation between default timer resolution 15.600 in exact milliseconds, means 15600/15000 + small overhead); Decreasing of TMR_RES_TOLERANCE (up to 0) makes tcl more "RTS" resp. NRT-capable (very precise wait-intervals, but more CPU-hungry).
* [win] fallback to replace C++ keyword "inline" with C keyword "__inline" sebres2017-07-031-0/+10
| | | | | Otherwise depending on the VC-version, context, include-order it can cause: error C2054: expected '(' to follow 'inline'
* [win32] use timer resolution handling in Tcl_Sleep also; sebres2017-07-032-20/+75
|
* Use auto-reset event object (system automatically resets the event state to ↵sebres2017-07-031-2/+1
| | | | nonsignaled after wake-up), avoids unwanted reset if wake-up for some other reasons (timeout/aio/message).
* optimization of Tcl_LimitExceeded by internal usage (tclInt header) sebres2017-07-032-0/+10
|
* dynamic increase of timer resolution corresponding wait-time; sebres2017-07-036-74/+386
| | | | non-blocking wait for event - if block-time set outside an event source traversal, use it as timeout, so can return with result 0 (no events);
* [enhancement] extend "vwait" with same options as "update", new syntax ↵sebres2017-07-036-89/+151
| | | | | | | | | | "vwait ?options? ?timeout? varname". some small improvements and fixing: - Tcl_DoOneEvent can wait for block time that was set with Tcl_SetMaxBlockTime outside an event source traversal, and stop waiting if Tcl_SetMaxBlockTime was called outside an event source (another event occurs and interrupt waiting loop), etc; - safer more precise pre-lookup by options (use TclObjIsIndexOfTable instead of simply comparison of type with tclIndexType); test cases extended to cover conditional "vwait" usage;
* interim commit: try to extend "vwait" with same options as "update" sebres2017-07-032-61/+121
|
* [performance] do one event (update / event servicing) cycle optimized ↵sebres2017-07-036-69/+326
| | | | | | | (introduced threshold to prevent sourcing resp. waiting for new events by no-wait). [enhancement] new event type introduced: TCL_ASYNC_EVENTS, command "update" becomes options to process only specified types, resp. to bypass some event types (including -idle/-noidle that in opposite to "idletasks" does not included window events); test cases extended.
* command "vwait" extended with timeout argument (in ms), 0 could be used to ↵sebres2017-07-032-10/+140
| | | | | | process pending events only (without wait), negative value equivalent execution of "vwait" without timeout (infinite); test cases fixed and extended;
* [performance] much better handling for timer events within Tcl_ServiceEvent ↵sebres2017-07-034-138/+51
| | | | | | using timer marker in the queue and direct call of TclServiceTimerEvents if marker reached (instead of continuous adding handler event, polling it in the queue and removing hereafter); this provides double performance increase in the service cycle;
* [performance] large performance increase by event servicing cycles (3x - 5x ↵sebres2017-07-036-164/+238
| | | | | | | | faster now); [win] prevent listen using PeekMessage twice, and no wait anymore for too short timeouts (because windows can wait too long), compare 0µs with up-to 100µs overhead within MsgWaitForMultipleObjectsEx; [bad behavior] process idle events only as long as no other events available (now TclPeekEventQueued will be used to check new events are available in service idle cycle); [enhancement] new option "noidletasks" for command "update", so "update noidle" means "process all events but not idle";
* [performance] introduced additional queue for prompt timer events (after 0) ↵sebres2017-07-034-262/+310
| | | | | | that should be executed immediately (no time); normalizes timer, prompt and idle events structures using common TimerEntry structure for all types;
* bug fix: wrong release of after-id tcl-object if it switch type (object leak) sebres2017-07-031-7/+13
|
* [bug/stable fix] don't execute TimerSetupProc directly (may be unwanted, ↵sebres2017-07-031-21/+55
| | | | | | | because changes the blocking time, also if TCL_TIMER_EVENTS|TCL_IDLE_EVENTS not set), so let do that within Tcl_DoOneEvent cycle only (we have registered an event source). [performance] optimization for "after 0" as immediately execution without time (invoke as soon as possible) - generation and invocation of such timers twice faster now. [performance] leave handler-event in the queue as long as pending timers still available (with expired time or immediate timers) by generation lock, resp. changed/not invalidated timer-queue) - so fewer event/allocations and guarantee to be executed within the next event cycle;
* after-id: introduced object of type "afterObjType" as self-referenced weak ↵sebres2017-07-032-29/+227
| | | | | | pointer to timer/idle event, used for fast access to the "after" event (cancel, info etc.); test cases extended to cover it additionally
* rewrite interpreter limit handling using new timer event handling (with ↵sebres2017-07-032-50/+59
| | | | delete callback)
* timer resp. idle events optimized: better handling using doubly linked ↵sebres2017-07-033-190/+418
| | | | lists, prevents allocating memory twice for the "after" events (use memory inside timer/idle event for the "after" structure), etc.
* [performance] after-event list optimized (interp-assoc switched to doubly ↵sebres2017-07-032-36/+53
| | | | linked list, because requires handling from both ends of the list)
* [win32] optimized calibration cycle (makes Tcl for windows "RTS" resp. ↵sebres_8_5_timeratesebres2017-05-231-53/+122
| | | | | | | | | | NRT-capable): - the clock ticks never backwards (avoid it by negative drifts using comparison of times before and after calibration); - more precise, smooth/soft drifting (avoids too large drifts, already after 10 iterations the drift gets fewer as 0.1 microseconds); - because of more accurate drifting (aspire to the smallest difference), we can prolong calibration interval (up to 10 seconds by small tdiff-value); Closes ticket [b7b707a310ea42e9f1b29954ee8ca13ae91ccabe] "[win32] NRT-only - NativeGetTime backwards time-drifts bug"
* back-ported branch sebres-8-6-timerate (new command "timerate" for 8.5)sebres2017-05-1610-141/+944
|\
| * man for timerate (doc/timerate.n)sebres_8_6_timeratesebres2017-05-111-0/+114
| |
| * add missing compile functionality (TclPreserveByteCode/TclReleaseByteCode ↵sebres2017-05-091-0/+19
| | | | | | | | back-ported as inline from trunk)
| * back-ported branch sebres_trunk_timerate (new command "timerate" for 8.6)sebres2017-05-097-48/+679
| |\
| | * timerate: don't calculate threshold by too few iterations, because sometimes ↵sebres2017-03-071-0/+7
| | | | | | | | | | | | first iteration(s) can be too fast (cached, delayed clean up, etc).
| | * merge trunksebres2017-03-06110-619/+1084
| | |\
| | | * merge core-8-6-branchsebres2017-03-063-5/+11
| | | |\