Last modified: 2007-02-13 07:12:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8752 - performance: don't query for desiredUnits and serviceLinks at DataValue creation
performance: don't query for desiredUnits and serviceLinks at DataValue creation
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: S Page
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-24 11:11 UTC by S Page
Modified: 2007-02-13 07:12 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch to SMW_DataValue.php (3.79 KB, patch)
2007-01-31 10:24 UTC, S Page
Details

Description S Page 2007-01-24 11:11:58 UTC
SMWDatValue->newAttributeValue() sets up desiredUnits and serviceLinks (and new
possibleValues if we implement enumeration).  These may involve DB queries.  It
seems it would be better to set these to null or false and only give them values
if and when their getDesiredUnits/ServiceLinks() methods are called.
Comment 1 S Page 2007-01-31 09:54:40 UTC
I have a local patch that fixes this.  Without it, I verified that a simple
inline query like [[Climate:=+]] makes five GetSpecialPropertyValues queries for
the attribute Climate's special properties (HAS_TYPE, MAIN_DISPLAY_UNIT,
DISPLAY_UNIT, POSSIBLE_VALUES, and SERVICE_LINK).

With my patch, these queries go away.  However, it's a potentially destabilizing
change so I'm going to run with it a while before committing it, or I can share
it with interested developers.

Note that each result in the inline query still makes a GetSpecialPropertyValues
query for SERVICE_LINK, because newAttributeValue() winds up calling the
datatype's processValue() which adds service links whether or not they're not
needed.  processValue() needs to be refactored.
Comment 2 S Page 2007-01-31 10:24:49 UTC
Created attachment 3163 [details]
patch to SMW_DataValue.php

Patch works for me, not sure about service links.
Comment 3 S Page 2007-02-13 07:12:00 UTC
I checked in fixed SMW_DataValue.php to SVN.  I filed bug 8961 about refactoring
processValue() to do less work.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links