#17760 closed defect (bug) (fixed)
Allow partial builds to be even smaller
Reported by: | nacin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | 2nd-opinion |
Focuses: | Cc: |
Description
Currently, wp-admin/includes/update-core.php requires three other files to also exist in the package: wp-settings.php, wp-admin/admin.php, and wp-includes/functions.php.
While these files are critical, WordPress will fall on its head if any major file is missing.
wp-includes/functions.php is pretty large, at 4556 lines, but even in a partial build where that file isn't chnaged, we need to include it.
By replacing wp-includes/functions.php with version.php and readme.html a partial build from 3.1.1 to 3.1.2 dropped from 115 KB to 78 KB.
While md5 will be on the table in v2 (and thus we can remove these checks), let's change update-core.php to validate the package via some smaller files and files that are always there.
At a minimum, that means wp-includes/version.php and readme.html. We can leave in wp-settings.php and wp-admin/admin.php without much overhead.
Attachments (2)
Change History (6)
#2
@
14 years ago
Those files would've simply been chosen as they're files which are required, them being present says that it's a full and valid zip. Changing to version.php and readme.html makes sense, they're going to change with partial builds, given we trust WordPres.org zip's to be valid, we don't really need to use the previous file checks.
Skipping wp-settings.php and wp-admin/admin.php shaves an extra 8 KB off the zip, down to 70 KB.