Module: check_mk
Branch: master
Commit: a7427c105e69905dca570763bdf585bd1d870bf8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a7427c105e6990…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Nov 10 11:12:18 2016 +0100
Removed useless assignments.
Zeroing parameters or local variables doesn't really make sense, unless we
capture the current environment in a closure and store that away somehow.
This is quite rare, and more often than not, a better solution is to lift
out the closure.
Setting something to null/undefined doesn't even speed up GC, because every
GC implementation worth its salt doesn't to naive reference counting,
anyway, and smears/delays its execution. So we are left with 2 scenarios:
* The JIT/interpreter is stupid and actually executes the assignment:
Then we do useless work and confuse the human reader.
* The JIT/interpreter does its job: The assignment will be nuked by dead
code elimination, but we still confuse the human reader.
---
web/htdocs/js/checkmk.js | 37 -------------------------------------
web/htdocs/js/dashboard.js | 6 ------
web/htdocs/js/search.js | 6 ------
web/htdocs/js/sidebar.js | 21 ---------------------
web/htdocs/js/wato.js | 14 --------------
5 files changed, 84 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=a7427c105e…