Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291167

[meta] improve performance by removing unused local variables

$
0
0

Problem/Motivation

That they are unnecessary lines of code.
These negatively impact performance.
Removing the unused variables improves performance, and also reduces noise in files and makes less code that needs to be maintained.

Proposed resolution

Remove the lines of code that declare the unused variables.

Remaining tasks

Identify each file that has an unused variable.
Make one issue per file.

Also, write down reproducable steps to identifying per file, each unused variable. Might require IDE.

Create the issue and list the variables in that issue.
Add the file to the table.
Link the issue in the table.

table of issues

FileIssue
/core/includes/*#2002704: Remove unused local variables from files in core/includes
core/includes/authorize.inc#2002706: Improve performance by removing unused local variables - core/includes/authorize.inc
core/includes/common.inc#2002708: Improve performance by removing unused local variables - core/includes/common.inc
core/includes/file.inc#2002714: Improve performance by removing unused local variables - core/includes/file.inc
core/includes/install.core.inc#2002720: Improve performance by removing unused local variables - core/includes/install.core.inc
core/includes/install.inc#2002722: Improve performance by removing unused local variables - core/includes/install.inc
core/includes/menu.inc#2002726: Improve performance by removing unused local variables - core/includes/menu.inc
core/includes/module.inc#2002728: Improve performance by removing unused local variables - core/includes/module.inc
core/includes/theme.inc#2002730: Improve performance by removing unused local variables - core/includes/theme.inc
core/includes/update.inc#2002732: Improve performance by removing unused local variables - core/includes/update.inc

Be careful of an include_once. It might use the variables that an IDE says is unused, but it is actually used. There are very few places in core that do that, but be careful of it.

(Small note be careful of list(). Most people can ignore this.)

User interface changes

No ui changes.

API changes

No api changes.


Viewing all articles
Browse latest Browse all 291167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>