http://www.perlmonks.org?node_id=1014412


in reply to Re^3: Perlmonks 'Not logged in Error' - Proposal for fix (load)
in thread Perlmonks 'Not logged in Error' - Proposal for fix

Do you realize that there are already people with existing cookies from perlmonks.org?
Uhm... so....? We're not using this solution because everybody with a cookie on perlmonks.org would have to login once more?
The device has yet to be invented that could notice that miniscule of a difference in server load.
There is the redirect solution. It doesn't cost anything and would work also for links posted somewhere else.

There is the explicit-domain-cookie-solution. It doesn't cost very much cpu (just check the server host and decide which cookie domain); it only needs some code (I can't estimate since I don't know the existing code). It also works for links posted somewhere else.

Still you favor the solution which costs the most cpu (and probably the most coding) and which only works for links posted on this site, because you think the load is not measurable? That's kindof like saying, as a european (or american, ...) I still want to drive my big car because it's of no use to save gas, there are much more cars in china, so if they don't save gas, I shouldn't either.

Replies are listed 'Best First'.
Re^5: Perlmonks 'Not logged in Error' - Proposal for fix (cpu)
by tye (Sage) on Jan 21, 2013 at 17:23 UTC

    I'm sorry that you have no clue about CPU load. But a redirect is not cost-free. It means that there are two page loads (with an attempt to make the first one have low expense, of course). That's actually a ton more CPU than the tiny addition in the middle of the existing code for rendering user content (and the total CPU for rendering user content is a rather tiny part of the server load for rendering a page).

    And that's even ignoring the extra CPU extravagantly wasted by CPU-guzzling bloated American-style browsers and all of the international network infrastructure that needs to be invoked for a second request! And some of that network gear will be located in poor countries that can barely afford such luxuries!

    Though I also see value in having perlmonks.org redirect to www.perlmonks.org

    Still you favor the solution which costs the most cpu

    Actually, I wasn't proposing only one solution and I actually had no comment at all (yet) on the cookie domain stuff.

    As for external links, there isn't a single external link on the internet that will result in me visiting PerlMonks "logged in". That is for security reasons. But... nevermind.

    Everybody getting their panties in a wad about CPU usage that will really be completely lost in the noise if you tried to measure it has made this whole thing fall into the category of "unfun" and so I'll go extravagantly waste my CPU somewhere else, now.

    - tye        

      I'm sorry that you have no clue about CPU load.
      oh yeah, sure.
      But a redirect is not cost-free. It means that there are two page loads
      It's an apache redirect which means there is no content coming back the first time and no perl code involved. and it's only for those links missing the 'www.' - the minority. And starting with the redirects, people will post less of the "wrong" links.
      That's actually a ton more CPU than the tiny addition in the middle of the existing code for rendering user content
      this would be happening for every request, also the ones with 'www.' - the majority.
      and I actually had no comment at all (yet) on the cookie domain stuff.
      I'm really looking forward to that now.