Markus Kroetzsch has uploaded a new change for review. Change subject: Fixed concept cache creation for SQLStore3 ......................................................................
Fixed concept cache creation for SQLStore3 Concept caching did not work with Store3 since it was disabled explicitly (easy to fix) and since concept DIs were not read correctly frmo the database. To address the latter, it is necessary to distinguish fields in the DI table from fields that should be retrieved when fetching the DI from the DB (because the concept table has two extra fields that are not relevant to DI creation). Now all DI handlers specify which information should be fetched from the DB to build their DIs, and since this is often just one row, the DI creation allows the use of a string instead of an array that contains a single string only. This safes memory, which is the main goal in this mechanism. Concrete changes: * All DIHandlers have a method getFetchFields() that works like getTableFields() but only for fields whose contents is needed to create the DI. * The SQLStore3Reader uses these fields instead of the table fields to fetch semantic data * The SQLStoreReader uses plain strings instead of arrays whenever only one value is fetched * The DIHandlers slightly change their dataItemFromDBKeys() implementations to use plain strings instead of arrays if only one key is needed. Checks are added to make sure that we never mistake an array for a string or vice versa (no PHP warnings even on unusual circumstances). * Minor documentation and style updates in the affected methods/files. Change-Id: I3f8589b5bc8210d3866e07a9bfe8bdd513ec2688 --- M includes/storage/SQLStore/SMW_DIHandler_Bool.php M includes/storage/SQLStore/SMW_DIHandler_Concept.php M includes/storage/SQLStore/SMW_DIHandler_GeoCoord.php M includes/storage/SQLStore/SMW_DIHandler_Number.php M includes/storage/SQLStore/SMW_DIHandler_String.php M includes/storage/SQLStore/SMW_DIHandler_Time.php M includes/storage/SQLStore/SMW_DIHandler_URI.php M includes/storage/SQLStore/SMW_DIHandler_WikiPage.php M includes/storage/SQLStore/SMW_DataItemHandler.php M includes/storage/SQLStore/SMW_SQLStore3.php M includes/storage/SQLStore/SMW_SQLStore3_Readers.php M includes/storage/SQLStore/SMW_Sql3StubSemanticData.php M maintenance/SMW_conceptCache.php 13 files changed, 199 insertions(+), 83 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/55/31855/1 -- To view, visit https://gerrit.wikimedia.org/r/31855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f8589b5bc8210d3866e07a9bfe8bdd513ec2688 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Markus Kroetzsch <mar...@semantic-mediawiki.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits