statistics.module is 25KB loaded for every page view. Split into two components, statistics.module for every page view and statistics.admin.inc for use on admin pages only. statistics.module shrinks to 13KB and the extra admin stuff, 14KB, is not loaded when regular visitors visit.
As a guide, I enclose the files from my 5.0 site based on statistics.module v 1.249 2007/01/10 15:17:51.
The *_in_admin() and *_module_path() functions are separated out because I use similar code in several modules and in some modules there are multiple uses of both functions. The code is from 4.7 or earlier. There are probably better ways of performing both functions. In the statistics module there is no need to use functions for either as there is only one use of each. The _in_admin() function is the one most widely used and in need of a drupal_in_admin() function.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | statistics_0.zip | 7.46 KB | peterx |
| statistics.zip | 7.46 KB | peterx |
Comments
Comment #1
peterx commentedNote that statistics.zip contains the statistics_discard patch from 6.0 dev.
Comment #2
peterx commentedUpdated the zip file.
Comment #3
RobRoy commentedFeatures go against next major version and see http://drupal.org/patch to submit a real patch. Thanks.
Comment #4
bdragon commentedFixed by the menu split patch series.