Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
9 Dec 2009 at 12:15 UTC
Updated:
3 Jan 2014 at 01:08 UTC
Jump to comment: Most recent
To begin with, it's not used in core. It's not feasible to implement it for any key-value store (memcache. apc, whatnot). So... why it is there?
| Comment | File | Size | Author |
|---|---|---|---|
| no_session_count.patch | 4.59 KB | chx |
Comments
Comment #1
brianV commented+1 for getting rid of this.
If someone really needs it, it can easily be added in via a contrib module, or a few lines of code in a custom block.
Comment #2
dries commentedI'm OK with removing this functionality. Will commit unless someone objects.
Comment #3
sunerrrrr. admin_menu uses this function, and it really helped that we improved it for D7.
Comment #4
chx commentedThere is a small problem: the function is unusable. In D6 there were some optimizations to not start a session for first visitors (aka googlebot) but in D7 the optimization is much heavier: unless you need a session you wont get one. So the function is totally and absolutely useless to count your anon visitors because (unless you destroy the performance increase) it will typically be 0. If you pick (and you should) another way to do stats, well it's easier to make that discern between anon and auth visitors.
Comment #5
sunIt seems I have to copy + paste.
Comment #6
sunCopy + paste the current code from D7 into admin_menu to at least count auth users, I meant.
Comment #7
catchhttp://api.drupal.org/api/function/user_block_view/7 is already using its own custom query for this. Completely unrelated side note, I'd like to see there issue where s.timestamp vs user.access was considered faster, seems like we could save a DISTINCT there.
Comment #8
dries commentedSo, we OK with removing this then?
Comment #9
sunYes it seems so. chx told me that there's almost nothing to count for anonymous users in D7, which was done elsewhere. While that is probably cool for performance, it's not really cool for modules that want to do something with anonymous visitors. Most likely, we need a dedicated contrib module to bring back some kind of new stats.
Comment #10
dries commentedAlright, committed to CVS HEAD. Thanks!