Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Strange behavior: Class::DBI with CGI::Application

by rlb3 (Deacon)
on Feb 07, 2005 at 22:50 UTC ( [id://428847]=note: print w/replies, xml ) Need Help??


in reply to Strange behavior: Class::DBI with CGI::Application

Hello,

I use you same combination of modules in my web apps. But what I do is only send the primary key into CGI::Session then do User->retrieve() on that value when I need to. Hasn't broke on me yet... :) (Knock on wood).

rlb3

Replies are listed 'Best First'.
Re^2: Strange behavior: Class::DBI with CGI::Application
by johnnywang (Priest) on Feb 07, 2005 at 23:06 UTC
    I was trying to save one database trip for loading the User object (except the first time). I guess I can use your method also.
      I was trying to save one database trip for loading the User object (except the first time).

      Why? Had you noticed a performance penalty with the extra database trip? Had your users complained? Were you 500'ing requests because your servers were overloaded?

      If the answer to the above questions is no, then don't worry about performance. Performance is something that should be addressed if AND ONLY IF it becomes a problem.

      </soapbox>

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

        Was just looking through older threads (this one's not so old), and found this:

          dragonchild: Performance is something that should be addressed if AND ONLY IF it becomes a problem.

        Hm, if I'm contracted out to make a new application, why would I write it with any known future performance problems? The best way to fail to get a followup contract would be for a brand new application I wrote to start choking as more real users are allowed to touch it. I know there's such a thing as premature optimization, but I also know that there's a reason that DBAs get $120K to start... in Kansas.

        "Halley, I know we said we expected Frobnitz.com to get a thousand hits a week, but Paris Hilton just mentioned how she loves her new Frobnitz in the middle of her latest inadvertent sex tape. The machine keeps falling over, and we're only getting a thousand hits an hour. Yet our popular Squonk.com site on an identical machine in the same rack is handling five thousand concurrent users easily. What the frell?"

        --
        [ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://428847]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-18 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found