Skip to content

Lazily check for update and cache strlen#87

Open
IAKOBVS wants to merge 11 commits into
torrinfail:masterfrom
IAKOBVS:dwmblocks
Open

Lazily check for update and cache strlen#87
IAKOBVS wants to merge 11 commits into
torrinfail:masterfrom
IAKOBVS:dwmblocks

Conversation

@IAKOBVS

@IAKOBVS IAKOBVS commented Jan 1, 2026

Copy link
Copy Markdown

Instead of comparing the whole statusstr to the old statusstr (in getstatus), only compare the result of each shell script that is currently called to the old result (in getcmd), and before comparing, check whether the length of the new string is different to the old string, the old length being cached, in which case we can avoid the comparison.

delimLen is made equal to strlen(delim) to avoid confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant