Permalink
Browse files

Enhance performance by accessing model only if needed

- model is only access, when namespaces are not yet fetched, which saves some
  SPARQL queries
  • Loading branch information...
1 parent e6a6777 commit d5d86d592e25fab31a875f0c0ab278caa370a21f @pfrischmuth pfrischmuth committed Dec 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 library/Erfurt/Namespaces.php
@@ -240,10 +240,10 @@ public function getNamespacePrefixes($graph)
*/
public function getNamespacesForGraph($graph)
{
- $model = $this->getModel($graph);
$graph = (string)$graph;
if (!array_key_exists($graph, $this->_namespaces)) {
+ $model = $this->getModel($graph);
$graphNamespaces = array();
// load graph configuration froms store

0 comments on commit d5d86d5

Please sign in to comment.