mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #32021
[Bug 1526073] [NEW] set_config() writes to the database even if it's not necessary
Public bug reported:
Mahara's set_config() methods updates the database every single time you
call it, even if you haven't actually changed the value of the field.
It would be more efficient if it did not do this. Especially since it
already does a SELECT statement to check whether it needs to do an
UPDATE or INSERT, it would be trivial to also make it check to see if
the value in the database is the same as the value passed by the user,
and skip that UPDATE if so.
** Affects: mahara
Importance: Low
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Tags: performance
** Changed in: mahara
Assignee: (unassigned) => Aaron Wells (u-aaronw)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1526073
Title:
set_config() writes to the database even if it's not necessary
Status in Mahara:
In Progress
Bug description:
Mahara's set_config() methods updates the database every single time
you call it, even if you haven't actually changed the value of the
field.
It would be more efficient if it did not do this. Especially since it
already does a SELECT statement to check whether it needs to do an
UPDATE or INSERT, it would be trivial to also make it check to see if
the value in the database is the same as the value passed by the user,
and skip that UPDATE if so.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1526073/+subscriptions
Follow ups