Opened 14 years ago
Closed 14 years ago
#21422 closed enhancement (fixed)
Micro-optimization in admin-footer.php
| Reported by: | TobiasBg | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Administration | Version: | 3.3 |
| Severity: | trivial | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
14 years ago
- Component General → Administration
- Keywords commit added
- Milestone Awaiting Review → 3.5
- Severity normal → trivial
#2
@
14 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.)
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch to remove unnecessary implode() call and two local variables