? ? Language Change Documentation Required ? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
2 Apr 2022

Summary of Changes

This should improve performance for sites that does not use User registration/login feature.

We already have an option to disable "Track Session Metadata",
However it more usefull to be able to disable it only for non registered users, while keep track of metadata for loged in users.
That what I made here.

Testing Instructions

Enable debug with DB queries enabled.
Visit the site frontend (do not login) and check how much DB queries.

Apply patch.
Go to global configuration and set "Track Session Metadata for non registered Users" to "No".
Visit the site frontend again (do not login) and check how much DB queries.

Expected result AFTER applying this Pull Request

All should continue work as before, without any errors.

And it should reduce 2db query.

Documentation Changes Required

Yes, I guess, need a description for this feature.

avatar Fedik Fedik - open - 2 Apr 2022
avatar Fedik Fedik - change - 2 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2022
Category Administration com_config Language & Strings Libraries
avatar dgrammatiko
dgrammatiko - comment - 2 Apr 2022

Does it also drops the cookie for non logged in users?

avatar Fedik
Fedik - comment - 2 Apr 2022

Does it also drops the cookie for non logged in users?

hm, nope, session still works as before, it just does not store "User state" in database.

avatar dgrammatiko
dgrammatiko - comment - 2 Apr 2022

I have tested this item successfully on a1e36cf


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37459.

avatar dgrammatiko dgrammatiko - test_item - 2 Apr 2022 - Tested successfully
avatar HLeithner
HLeithner - comment - 2 Apr 2022

Wrong approach in my opinion, we should try to create no user session if we have only a guest user. And only create the session if needed by a extension.

avatar brianteeman
brianteeman - comment - 2 Apr 2022

Good luck with that

avatar Fedik Fedik - change - 2 Apr 2022
Labels Added: ? Language Change Documentation Required ?
avatar HLeithner
HLeithner - comment - 2 Apr 2022

Good luck with that

I wrote already a poc a while ago

avatar Fedik
Fedik - comment - 2 Apr 2022

@HLeithner I just extending existing feature ?

we should try to create no user session if we have only a guest user. And only create the session if needed by a extension.

That would be better of course, but that will be much to do, and I have no idea how.
And when someone will make it, it will be not hard to remove current "option".

avatar HLeithner
HLeithner - comment - 2 Apr 2022

true, other thing isn't select box with 3 options better?

avatar Fedik
Fedik - comment - 2 Apr 2022

true, other thing isn't select box with 3 options better?

I not sure.
Then probably I need to change the session_metadata value type to integer, that tehnically will be b/c. It is boolean currently.

avatar simbus82
simbus82 - comment - 2 Apr 2022

This should improve performance for sites that does not use User registration/login feature.

I'm really interested in this aspect, performance. In case of many visitors then this solution can improve the performances avoiding the work due to the creation of the sessions ... correct?
What side effects, if any, will there be compared to the current CMS behavior for guests?

Thanks!

avatar HLeithner
HLeithner - comment - 2 Apr 2022

I'm really interested in this aspect, performance. In case of many visitors then this solution can improve the performances avoiding the work due to the creation of the sessions ... correct? What side effects, if any, will there be compared to the current CMS behavior for guests?

Thanks!

sadly not, it only allow to disable metadata for guest users, you can disable metadata for all users if you like then no addition database query for updating the stats will be done. But still Joomla creates a Session for each user (request without session)

avatar martin-zw
martin-zw - comment - 28 Apr 2022

I have tested this item successfully on b2d406e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37459.

avatar martin-zw martin-zw - test_item - 28 Apr 2022 - Tested successfully
avatar joeforjoomla
joeforjoomla - comment - 28 Apr 2022

I have tested this item ? unsuccessfully on b2d406e

The new parameter is not b/c because it's set by default to 0 and it's disabled by default. This causes to lose metadata for guest users by default causing b/c issues to extensions relying on these data also for guest users.
The parameter must be '1' enabled by default.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37459.

avatar joeforjoomla joeforjoomla - test_item - 28 Apr 2022 - Tested unsuccessfully
avatar Fedik
Fedik - comment - 29 Apr 2022

I have changed to enabled by default, test again

avatar martin-zw
martin-zw - comment - 2 May 2022

I have tested this item successfully on 99e7bb9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37459.

avatar martin-zw martin-zw - test_item - 2 May 2022 - Tested successfully
avatar joeforjoomla
joeforjoomla - comment - 2 May 2022

I have tested this item successfully on 99e7bb9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37459.

avatar joeforjoomla joeforjoomla - test_item - 2 May 2022 - Tested successfully
avatar alikon alikon - change - 2 May 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 2 May 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37459.

avatar Fedik Fedik - change - 4 May 2022
Labels Added: ?
avatar roland-d roland-d - change - 4 May 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-05-04 18:42:27
Closed_By roland-d
avatar roland-d roland-d - close - 4 May 2022
avatar roland-d roland-d - merge - 4 May 2022

Add a Comment

Login with GitHub to post a comment