/    Sign up×
Community /Pin to ProfileBookmark

Session bogging down my computer?

Do PHP sessions bog down a computer? (I’m accessing the page through localhost). If so, how do I get away from that?

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@NogDogAug 03.2010 — I don't know why it would unless you are storing huge amounts (for some undefined value of "huge") in the session data, in which case it would be reading/writing that data from/to the disk (or disk cache) on each page request.
Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorAug 05.2010 — I'm using at most TWO session variables: $_SESSION['logged'] and (maybe) $_SESSION['message']. Is it because I don't use session_destroy(); at the end of each page?
Copy linkTweet thisAlerts:
@NogDogAug 05.2010 — I really can't imagine why that would be noticeably slowing things down. Are you using the default session-handler, or are you using a custom handler -- perhaps something using a database for storage? Or, maybe the disk is in serious need of defragmentation?

I guess I'd have to do some metering to find out where exactly things are bogging down before I'd be willing to blame it on sessions.
Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorAug 05.2010 — My hard drive doesn't seem to need it, and I'm using the default session handler.

All I know is that my comp gets really slow, and my Page File Usage skyrockets.
Copy linkTweet thisAlerts:
@NogDogAug 05.2010 — Well, what evidence do you have that it's the use of sessions and not some other part of the script? (I'm not saying you're wrong, I'm just trying to figure out how you could be right. ? )
Copy linkTweet thisAlerts:
@Jarrod1937Aug 05.2010 — do a print_r($_SESSION); and post back here the results (unless it contains some sensitive info). This will let us better judge if you're storing too much in your session variables.
×

Success!

Help @Mr_Initial_Man spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...