Forums / Developer / Engineering: feedback about LastAccessesURI & redirects

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)

eZ debug

Timing: Jan 17 2025 23:51:03
Script start
Timing: Jan 17 2025 23:51:03
Module start 'content'
Timing: Jan 17 2025 23:51:04
Module end 'content'
Timing: Jan 17 2025 23:51:04
Script end

Main resources:

Total runtime1.1986 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.2891180.8125
Module start 'content' 0.00681.0702 770.1016685.9531
Module end 'content' 1.07700.1215 1,456.0547341.0547
Script end 1.1985  1,797.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3271210.0002
Check MTime0.00160.1313210.0001
Mysql Total
Database connection0.00070.060410.0007
Mysqli_queries1.119993.43792070.0054
Looping result0.00230.18972050.0000
Template Total1.173397.920.5867
Template load0.00180.152920.0009
Template processing1.171597.739420.5857
Template load and register function0.00010.008010.0001
states
state_id_array0.00080.062910.0008
state_identifier_array0.00120.097520.0006
Override
Cache load0.00160.1332380.0000
Sytem overhead
Fetch class attribute can translate value0.00150.125950.0003
Fetch class attribute name0.00130.1070100.0001
XML
Image XML parsing0.00210.173450.0004
class_abstraction
Instantiating content class attribute0.00000.0020120.0000
General
dbfile0.00270.2269480.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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