From: Boris Z. <bo...@2b...> - 2004-12-17 11:31:10
|
Hi Shimon, Am Donnerstag, 16. Dezember 2004 22:41 schrieb sh...@ru...: > Hi, > > Does anyone know of a way to disable instantiation of the > (Apache::SessionX) session object for each pagekit request? I have an > application that does not use session at all, but each page request incurs > the performance hit of instantiating one of these and loading data off disk > or off DB. The session's are a tricky thing. But are you really sure that you did not use sessions at all? Off Hand, PageKit does not create a session unless you use the session. If you are logged in, the user must have a session, since at least the last_activity_time is stored in the session. > > Perhaps a better solution would be "lazy" instantiation of SessionX - only > instantiate it on the first call to $model->session. That way, if any > request does not require access to the session, it will not incur the > startup cost, without the programmer having to actually think about this. > > (Instantiating a session can be slow because it means loading data from > disk or DB.) > > So in short: > > - Can I manually disable instantiation of session if I don't use it? (Or > is pagekit using it internally for some reason?) > > - Could PageKit be made a little smarter in order to eliminate my reason > for considering that option? > try sub pkit_session_setup { {} } in Common.pm to trash the session. This might give lots of warnings, but perhaps it works. Please let me know. > thanks, > shimon. -- Boris |