Engineering: feedback about LastAccessesURI & redirects

Author Message

Bertrand Dunogier

Thursday 22 July 2010 1:42:21 am

Hi developers,

we are currently refactoring our session management in order to implement session-less anonymous users & move away from forced DB based sessions in order to remove this performance bottleneck.

Two commonly used session variables are LastAccessesURI, and LastAccessedModifyingURI. These are set in index.php, after a module/view has correctly executed, and are used as fallback when it comes to redirecting the user after an action.

Using the session for this is quite bad for several reasons (doesn't cope well with multiple browser windows, unusable for sessionless users, etc).

We would like your feedback about your usage of this feature in your extensions & work, so that we figure out the best way to replace this feature, and how it should be deprecated (if deprecated at all).

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Andrew Duck

Thursday 22 July 2010 1:47:03 am

I currently use both but given the performance benefits I am open to changing this out for another method.

What alternatives are you considering at the moment as a way to replace this functionality?

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Gaetano Giunta

Thursday 22 July 2010 2:55:14 am

- putting things in session is bad. for perfs, and for tabs. Putting things into cookies is better, but unless we find a way to make it cope with multiple tabs open, it basically means you have to carry that info around appending it to your urls everywhere (argh)

- the best way to avoid having to stuff LastAccessesURI in every url is to add it as post var and make every view that redirects accept that parameter - that would be a huge boon in any case

- please make an ini setting that allows the site owner to switch back to always-use-a-session-for-anon-users if he wants. I think we have users that like to track their site visitors in a very detailed way - or extensions that just assume that a session is always there

Principal Consultant International Business
Member of the Community Project Board

Bertrand Dunogier

Thursday 22 July 2010 2:59:05 am

Well, there are two possible approaches:

  • standardize a POST variable that can be used for redirections (RedirectURI is the most likely candidate)
  • remove the need for this variable in the kernel code, so that there always is an alternative

Do you think you'll be facing situations where you can't pass a variable along ?

"

- the best way to avoid having to stuff LastAccessesURI in every url is to add it as post var and make every view that redirects accept that parameter - that would be a huge boon in any case

"

Yes, of course. RedirectURI as explained above. Making it used by default everywhere is a bit more risky, but it might be possible.

"

- please make an ini setting that allows the site owner to switch back to always-use-a-session-for-anon-users if he wants. I think we have users that like to track their site visitors in a very detailed way - or extensions that just assume that a session is always there

"

Yep, we have that. We actually have one setting that forces a session for anonymous users, and another one that forces LastAccessesURI (sigh...) & LastAccessedModifyingURI for users with a session. If you enable both, the URIs will always be stored.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Andrew Duck

Thursday 22 July 2010 3:10:54 am

Standardised POST variable sounds good to me.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Jérôme Vieilledent

Thursday 22 July 2010 5:33:19 am

Same for me : Standardised POST variable, with a BC INI setting (disabled by default)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 03:00:06
Script start
Timing: Jan 18 2025 03:00:06
Module start 'layout'
Timing: Jan 18 2025 03:00:06
Module start 'content'
Timing: Jan 18 2025 03:00:06
Module end 'content'
Timing: Jan 18 2025 03:00:06
Script end

Main resources:

Total runtime0.7459 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0625152.6406
Module start 'layout' 0.00580.0032 740.703139.4766
Module start 'content' 0.00900.7357 780.1797680.8594
Module end 'content' 0.74470.0012 1,461.039120.1250
Script end 0.7459  1,481.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4067160.0002
Check MTime0.00130.1709160.0001
Mysql Total
Database connection0.00070.094210.0007
Mysqli_queries0.682791.5235700.0098
Looping result0.00080.1045680.0000
Template Total0.715695.920.3578
Template load0.00220.296820.0011
Template processing0.713495.646020.3567
Template load and register function0.00010.015210.0001
states
state_id_array0.00090.126210.0009
state_identifier_array0.00120.155320.0006
Override
Cache load0.00190.2559380.0001
Sytem overhead
Fetch class attribute can translate value0.00060.074140.0001
Fetch class attribute name0.00130.1706100.0001
XML
Image XML parsing0.00190.250340.0005
class_abstraction
Instantiating content class attribute0.00000.0030120.0000
General
dbfile0.00160.2098370.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs