Opened 12 years ago
Closed 12 years ago
#21422 closed enhancement (fixed)
Micro-optimization in admin-footer.php
Reported by: | TobiasBg | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | trivial | Version: | 3.3 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
After some work (related to the admin bar) on admin-footer.php in wp-admin a while ago ([18888], the latest change in the file), the file does some unnecessary stuff, like an implode() on a one-item array, that's constant and unchangable.
It's just minor, but still done on every page load in the Dashboard, so let's just micro-optimize it away.
The attached patch removes that unnecessary implode() and two local variables.
Attachments (1)
Change History (4)
#1
@
12 years ago
- Component changed from General to Administration
- Keywords commit added
- Milestone changed from Awaiting Review to 3.5
- Severity changed from normal to trivial
#2
@
12 years ago
There used to be other members of the array here.
I don't really like "micro-optimization" arguments, but this can be argued for much simpler reasons: It improves code readability.
(And, often, code readability goes against what could be considered a "micro-optimization" — in those cases, readability should take precedence. In this case, they are on the same side.)
Patch to remove unnecessary implode() call and two local variables