Skip to content

Commit

Permalink
revert: "perf: reduce scheduler task check to 10 second interval (#429)…
Browse files Browse the repository at this point in the history
…" (#432)

This reverts commit 1681ce4.
  • Loading branch information
vladdoster authored Dec 1, 2022
1 parent 1681ce4 commit cfd3261
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions zinit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2390,14 +2390,12 @@ $match[7]}:-${ZINIT[__last-formatter-code]}}}:+}}}//←→}
# (delay), i.e. "burst" allows to run package installations from
# script, not from prompt.
@zinit-scheduler() {
integer ___ret="${${ZINIT[lro-data]%:*}##*:}" ___secs=$(($#ZINIT_TASKS>1?1:10))
integer ___ret="${${ZINIT[lro-data]%:*}##*:}"
# lro stands for lastarg-retval-option.
[[ $1 = following ]] && sched +$___secs 'ZINIT[lro-data]="$_:$?:${options[printexitvalue]}"; @zinit-scheduler following "${ZINIT[lro-data]%:*:*}"'
[[ -n $1 && $1 != (following*|burst) ]] && \
{ local THEFD="$1"; zle -F "$THEFD"; exec {THEFD}<&-; }
[[ $1 = following ]] && sched +1 'ZINIT[lro-data]="$_:$?:${options[printexitvalue]}"; @zinit-scheduler following "${ZINIT[lro-data]%:*:*}"'
[[ -n $1 && $1 != (following*|burst) ]] && { local THEFD="$1"; zle -F "$THEFD"; exec {THEFD}<&-; }
[[ $1 = burst ]] && local -h EPOCHSECONDS=$(( EPOCHSECONDS+10000 ))
ZINIT[START_TIME]="${ZINIT[START_TIME]:-$EPOCHREALTIME}"
[[ -n ${ZINIT_TASKS:#<no-data>} ]] && return 0

integer ___t=EPOCHSECONDS ___i correct
local -a match mbegin mend reply
Expand Down Expand Up @@ -3278,8 +3276,6 @@ typeset -g REPLY

# a searchable menu of tags for current directory
zinit null light-mode autoload'zi-browse-symbol' for %$ZINIT[BIN_DIR]
ZINIT_REGISTERED_PLUGINS[-1]=()

zle -N zi-browse-symbol
zle -N zi-browse-symbol-backwards zi-browse-symbol
zle -N zi-browse-symbol-pbackwards zi-browse-symbol
Expand Down

0 comments on commit cfd3261

Please sign in to comment.