[Koha-bugs] [Bug 18821] TrackLastPatronActivity is a performance killer
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Apr 30 15:06:00 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18821
Julian Maurice <julian.maurice at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |julian.maurice at biblibre.com
--- Comment #18 from Julian Maurice <julian.maurice at biblibre.com> ---
(In reply to Jonathan Druart from comment #15)
> I am not against the patch, but it's hard to imagine that 1 update query by
> request can be a "performance killer".
For me the patch saves approximately 4ms per request. Not the huge performance
boost I expected by reading the bug title but it does save some time.
It should be noted that in the syspref description we can read
> Everytime a patron will connect, the borrowers.lastseen will be updated with the current time
"connect" might be interpreted in different ways but I think what most people
understand is that a connection is when a user types their credentials in order
to be logged in the application, and not when the user is automatically logged
in by a session cookie. So the patch actually makes Koha behaviour closer to
the syspref description.
However, I don't like the way it is done. Passing the CGI::Session object to a
Koha::Patron method so it can read it and write to it. I think "Koha::Object"s
methods shouldn't be aware of what we use to manage the session.
Instead we should call track_login only when needed, like for example just
after a successful login :
https://gitlab.com/koha-community/Koha/blob/e5d5038fa3a1fbfaf81f4b01d319b00af5a7c46c/C4/Auth.pm#L1161
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list